Skip to content

Commit

Permalink
Merge pull request #1127 from Ferrisx4/214_tripal_version_api
Browse files Browse the repository at this point in the history
214 tripal version api
  • Loading branch information
spficklin committed Nov 5, 2020
2 parents a95e5a8 + 3a7ad57 commit 5e6bafb
Show file tree
Hide file tree
Showing 26 changed files with 59 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/user_guide/install_tripal/upgrade_from_tripal2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Step 1: Upgrade Tripal

.. code-block:: bash
drush pm-download tripal-7.x-3.1
drush pm-download tripal-7.x-3.5
5. Enable the tripal module

Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_analysis/tripal_analysis.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the companalyses tables of Chado by providing pages for v
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal/legacy/tripal_analysis/configuration

dependencies[] = tripal_core
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_contact/tripal_contact.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the contact tables of Chado by providing pages for viewin
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_core/tripal_core.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Provides support for all Tripal modules and includes the Tripal AP
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal

stylesheets[all][] = theme/css/tripal_core.css
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_cv/tripal_cv.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the Controlled Vocabulary (CV) tables of Chado by providi
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal/vocab

dependencies[] = tripal_core
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_db/tripal_db.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the database cross-reference tables of Chado by providing
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal/legacy/tripal_db

dependencies[] = tripal_core
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_feature/tripal_feature.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the sequence (feature) tables of Chado by providing pages
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

stylesheets[all][] = theme/css/tripal_feature.css
scripts[] = theme/js/tripal_feature.js
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_featuremap/tripal_featuremap.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the map tables of Chado by providing pages for viewing an
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_genetic/tripal_genetic.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the genetic tables of Chado by providing pages for viewin
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_library/tripal_library.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the library tables of Chado by providing pages for viewin
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the natural diversity (ND) tables of Chado by providing p
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_organism/tripal_organism.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the organism tables of Chado by providing pages for viewi
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal/legacy/tripal_organism

stylesheets[all][] = theme/css/tripal_organism.css
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_phenotype/tripal_phenotype.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the phenotype tables of Chado by providing pages for view
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_phylogeny/tripal_phylogeny.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the phylogeny tables of Chado by providing pages for view
core = 7.x
project = tripal_phylogeny
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
dependencies[] = tripal_core
dependencies[] = tripal_cv
dependencies[] = tripal_db
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_project/tripal_project.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the project tables of Chado by providing pages for viewin
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal/legacy/tripal_project

dependencies[] = tripal_core
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_pub/tripal_pub.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the pub (publication) tables of Chado by providing pages
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

stylesheets[all][] = theme/css/tripal_pub.css

Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_stock/tripal_stock.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Supports the stock tables of Chado by providing pages for viewing,
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_core
dependencies[] = tripal_chado_views
Expand Down
2 changes: 1 addition & 1 deletion legacy/tripal_views/tripal_views.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description = Deprecated-- no longer provides any functionality. See Tripal Chad
core = 7.x
project = tripal
package = Tripal v2 Legacy
version = 7.x-3.1
version = 7.x-3.5
24 changes: 24 additions & 0 deletions tripal/tripal.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ function tripal_drush_help($command) {
case 'trp-get-currjob':
return dt('Returns details about the currently running tripal job including percent complete.');
break;
case 'trp-version':
return dt('Returns the current version of Tripal that is installed.');
break;
// Placeholders for unimplmeneted jobs
case 'trp-show-job':
break;
Expand Down Expand Up @@ -125,6 +128,13 @@ function tripal_drush_command() {
'Standard example' => 'drush trp-set-permissions --user=administrator',
],
];
$items['trp-version'] = [
'description' => dt('Returns the current version of Tripal that is installed.'),
'arguments' => [],
'examples' => [
'Standard usage' => 'drush trp-version',
],
];
return $items;
}

Expand Down Expand Up @@ -391,3 +401,17 @@ function drush_tripal_trp_set_permissions() {
drush_print(dt(""));
drush_print(dt("Permissions is now complete."));
}

/**
* Returns the current version of Tripal
*
* Executed when 'drush trp-version' is called.
*
* @ingroup tripal_drush
*
* @return string
*/
function drush_tripal_trp_version() {
$version = system_get_info('module', 'tripal');
drush_print("Tripal version: " . $version['version']);
}
2 changes: 1 addition & 1 deletion tripal/tripal.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Tripal is an toolkit to facilitate construction of online genomic,
core = 7.x
project = tripal
package = Tripal
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal

stylesheets[all][] = theme/css/tripal.css
Expand Down
11 changes: 11 additions & 0 deletions tripal/tripal.module
Original file line number Diff line number Diff line change
Expand Up @@ -1621,3 +1621,14 @@ function tripal_field_group_table_rows_alter(&$element, &$children) {
}
}
}

/**
* Returns the current version of Tripal, according to the tripal.info file
*
* @return string
* The version string of Tripal. Ex. 7.x-3.1
*/
function tripal_version() {
$version = system_get_info('module', 'tripal');
return $version['version'];
}
2 changes: 1 addition & 1 deletion tripal_bulk_loader/tripal_bulk_loader.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ description = Supports the construction of templates for customizable uploading
core = 7.x
project = tripal
package = Tripal
version = 7.x-3.1
version = 7.x-3.5

dependencies[] = tripal_chado_views
2 changes: 1 addition & 1 deletion tripal_chado/tripal_chado.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Provides a set of Chado-based fields for the Tripal Entities.
core = 7.x
project = tripal
package = Tripal
version = 7.x-3.1
version = 7.x-3.5

files[] = views_handlers/chado_views_handler_field.inc
files[] = views_handlers/chado_views_handler_filter.inc
Expand Down
2 changes: 1 addition & 1 deletion tripal_chado_views/tripal_chado_views.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Integrates all Chado tables with Drupal Views and provides basic s
core = 7.x
project = tripal
package = Tripal
version = 7.x-3.1
version = 7.x-3.5
configure = admin/tripal/storage/chado/views-integration

files[] = views/handlers/tripal_views_handler_filter_textarea.inc
Expand Down
2 changes: 1 addition & 1 deletion tripal_ds/tripal_ds.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Provides display options for Tripal Entities through extending Dis
core = 7.x
project = tripal
package = Tripal
version = 7.x-3.1
version = 7.x-3.5

stylesheets[all][] = theme/css/tripal_ds.css

Expand Down
2 changes: 1 addition & 1 deletion tripal_ws/tripal_ws.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Exposes Tripal Entites as RESTful web services.
core = 7.x
project = tripal
package = Tripal
version = 7.x-3.1
version = 7.x-3.5

stylesheets[all][] = theme/css/tripal_ws.css

Expand Down

0 comments on commit 5e6bafb

Please sign in to comment.