Merge branch 'develop' into feature/gutenberg-blocks
This commit is contained in:
commit
ed7eadf3d2
2
build.sh
2
build.sh
|
@ -68,7 +68,7 @@ rm -rf $wp_plugin_dir
|
|||
mkdir $wp_plugin_dir
|
||||
|
||||
rsync -axz --exclude='vendor/bin/phpc*' --exclude='vendor/squizlabs' --exclude='vendor/wimg' \
|
||||
--exclude='vendor/respect/validation/.git' --exclude='pdf-viewer/pdfjs-dist/web/compressed.tracemonkey-pldi-09.pdf' \
|
||||
--exclude='vendor/respect/validation/.git' --exclude='vendor/symfony/polyfill-mbstring/.git' --exclude='pdf-viewer/pdfjs-dist/web/compressed.tracemonkey-pldi-09.pdf' \
|
||||
src/* $wp_plugin_dir/
|
||||
|
||||
rm -rf $wp_plugin_dir/scss
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# Releasing a new version
|
||||
|
||||
This is a work in progress documentaion on how to release a new verion.
|
||||
This is a work in progress documentaion on how to release a new version.
|
||||
|
||||
Assuming:
|
||||
|
||||
* $CURRENT_VERSION is the current "old" version (e.g. 0.2)
|
||||
* $NEW_VERSION is the verion we are releasing (e.g. 0.3)
|
||||
* $NEW_VERSION is the version we are releasing (e.g. 0.3)
|
||||
* $GIT_PATH is where our repository is cloned
|
||||
* $BUILD_PATH is where the plugin is condigured to buid
|
||||
* $SVN_PATH is where the WordPress.org SVN repo is
|
||||
|
@ -15,19 +15,22 @@ Assuming:
|
|||
|
||||
```
|
||||
cd $GIT_PATH
|
||||
git checkout develop
|
||||
git pull
|
||||
```
|
||||
|
||||
### Edit version numbers
|
||||
|
||||
Edit `src/readme.txt` and 'src/tainacan.php' and change the verion numbers to `$NEW_VERSION`.
|
||||
Edit `src/readme.txt` and 'src/tainacan.php' and change the version numbers to `$NEW_VERSION`.
|
||||
|
||||
### Set build to production mode
|
||||
|
||||
Edit `webpack.config.js` to set production mode.
|
||||
|
||||
### Commit and create tag
|
||||
|
||||
```
|
||||
git commit -am"Releasing verion $NEW_VERSION"
|
||||
git tag $NEW_VERSION
|
||||
git push
|
||||
git push --tags
|
||||
git commit -am "Releasing verion $NEW_VERSION"
|
||||
```
|
||||
|
||||
### Build and cleanup
|
||||
|
@ -91,6 +94,18 @@ Commit!
|
|||
svn ci
|
||||
```
|
||||
|
||||
|
||||
### Create tag on git
|
||||
|
||||
```
|
||||
git tag $NEW_VERSION
|
||||
git checkout master
|
||||
git merge develop
|
||||
git push --all
|
||||
git push --tags
|
||||
```
|
||||
|
||||
### Set build back to development mode
|
||||
|
||||
Once you go back to develop branch, remember editing `webpack.config.js` to set production mode.
|
||||
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ export default {
|
|||
isLoading: false,
|
||||
isMetadataColumnCompressed: false,
|
||||
metadatumCollapses: [],
|
||||
collapseAll: false,
|
||||
collapseAll: true,
|
||||
visibility: 'publish',
|
||||
form: {
|
||||
collectionId: Number,
|
||||
|
@ -799,8 +799,9 @@ export default {
|
|||
// Obtains Item Metadatum
|
||||
this.fetchMetadata(this.itemId).then((metadata) => {
|
||||
this.isLoading = false;
|
||||
for (let metadatum of metadata) {
|
||||
this.metadatumCollapses.push(metadatum.metadatum.required == 'yes');
|
||||
for (let i = 0; i < metadata.length; i++) {
|
||||
this.metadatumCollapses.push(false);
|
||||
this.metadatumCollapses[i] = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
isLoading: false,
|
||||
isLoadingMetadatumMappers: false,
|
||||
isMetadataColumnCompressed: false,
|
||||
open: false,
|
||||
open: true,
|
||||
collectionName: '',
|
||||
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png',
|
||||
urls_open: false,
|
||||
|
|
|
@ -160,7 +160,7 @@ class CSV extends Importer {
|
|||
$valueToInsert = $this->handle_encoding( $values[ $column ] );
|
||||
|
||||
if( !is_numeric($metadatum_id) ){
|
||||
$metadatum = $this->create_metadata( $metadatum_id, $collection_definition['id']);
|
||||
$metadatum = $this->create_metadata( $headers[ $column ], $collection_definition['id']);
|
||||
} else {
|
||||
$metadatum = new \Tainacan\Entities\Metadatum($metadatum_id);
|
||||
}
|
||||
|
|
|
@ -908,8 +908,8 @@ abstract class Importer {
|
|||
* @throws \Exception
|
||||
*/
|
||||
protected function create_metadata( $metadata_description, $collection_id){
|
||||
$taxonomy_repo = \Repositories\Taxonomy::get_instance();
|
||||
$metadata_repo = \Repositories\Metadata::get_instance();
|
||||
$taxonomy_repo = \Tainacan\Repositories\Taxonomies::get_instance();
|
||||
$metadata_repo = \Tainacan\Repositories\Metadata::get_instance();
|
||||
|
||||
$properties = array_filter( explode('|', $metadata_description) );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Tags: museums, libraries, archives, GLAM, collections, repository
|
|||
Requires at least: 4.8
|
||||
Tested up to: 4.9.8
|
||||
Requires PHP: 5.6
|
||||
Stable tag: 0.4
|
||||
Stable tag: 0.5
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Plugin Name: Tainacan
|
|||
Plugin URI: https://tainacan.org/
|
||||
Description: powerfull and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional respository platform.
|
||||
Author: Media Lab / UFG
|
||||
Version: 0.4
|
||||
Version: 0.5
|
||||
Text Domain: tainacan
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
|
|
@ -258,7 +258,7 @@ class ImporterTests extends TAINACAN_UnitTestCase {
|
|||
$file = fopen($file_name, 'w');
|
||||
|
||||
// save the column headers
|
||||
fputcsv($file, array('Column 1', 'Column 2', 'Column 3', 'Column 4', 'Column 5'));
|
||||
fputcsv($file, array('novo metadatao|text', 'Column 2', 'Column 3', 'Column 4', 'Column 5'));
|
||||
|
||||
// Sample data
|
||||
$data = array(
|
||||
|
@ -363,7 +363,12 @@ class ImporterTests extends TAINACAN_UnitTestCase {
|
|||
//create a random mapping
|
||||
$map = [];
|
||||
foreach ( $metadata as $index => $metadatum ){
|
||||
$map[$metadatum->get_id()] = $headers[$index];
|
||||
if( $index === 0){
|
||||
$map['create_metadata'] = $headers[$index];
|
||||
} else {
|
||||
$map[$metadatum->get_id()] = $headers[$index];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$collection_definition['mapping'] = $map;
|
||||
|
@ -383,17 +388,6 @@ class ImporterTests extends TAINACAN_UnitTestCase {
|
|||
|
||||
$items = $Tainacan_Items->fetch( ['order'=> 'ASC','orderby' => 'date'], $collection, 'OBJECT' );
|
||||
|
||||
foreach ( $items as $index => $item ) {
|
||||
$singleItemMetadata = new Entities\Item_Metadata_Entity( $item, $metadata_taxonomy );
|
||||
|
||||
if( in_array( $item->get_title(),[ 'Data 11','Data 51', 'Data 12','Data 52'] ) ){
|
||||
|
||||
$term = $singleItemMetadata->get_value();
|
||||
$this->assertTrue(in_array( $term->get_name(),['DATA 151','DATA551'] ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->assertEquals( $_SESSION['tainacan_importer'][$id]->get_source_number_of_items(), count( $items ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue