diff --git a/build/Makefile b/build/Makefile index 44c24ae974..d154a34913 100644 --- a/build/Makefile +++ b/build/Makefile @@ -24,6 +24,9 @@ release-normal: superclean $(JS_SRCFILES) -cp -r * $(RELEASE_FULL_DIR); rm -rf $(RELEASE_FULL_DIR)/src/*/.git $(RELEASE_FULL_DIR)/$(RELEASE_FULL) $(RELEASE_FULL_DIR)/src/util $(RELEASE_FULL_DIR)/build; + # version-stamp Browser.js + perl -i -pE 's!(?<=BUILD_SYSTEM_JBROWSE_VERSION);! = "$(RELEASE_VERSION)";!' $(JSDIR)/Browser.js; + ( cd $(BASEDIR)/src/util/buildscripts && node ../../dojo/dojo.js load=build --require "$(BASEDIR)/build/init.js" --profile "$(JSDIR)/JBrowse.profile.js" --releaseDir "$(RELEASE_FULL_DIR)/src"; ) for HTMLFILE in index compat_121; do \ perl -pe "s/(?<=data-dojo-config=\")[^\"]+\"/deps: ['JBrowse'], async: 1\"/;" $$HTMLFILE.html > "$(RELEASE_FULL_DIR)/$$HTMLFILE.html"; \ @@ -33,6 +36,7 @@ release-normal: superclean $(JS_SRCFILES) perl -MDateTime -i -pE 'BEGIN{ $$datestring = DateTime->from_epoch( epoch => time(), time_zone => DateTime::TimeZone->new(name => "local"))->format_cldr(q|yyyy-MM-dd HH:mm:ss VVVV|)}; s/\{\{\$$NEXT\}\}\s*/$(RELEASE_VERSION) $$datestring\n/m' $(RELEASE_FULL_DIR)/release-notes.txt cp $(RELEASE_FULL_DIR)/release-notes.txt .; perl -i -pE 'say "{{\$$NEXT}}\n" unless $$x++' release-notes.txt; + $(ZIP) $(RELEASE_FULL).zip $(RELEASE_FULL)/; release-normal-test: release-normal diff --git a/src/JBrowse/Browser.js b/src/JBrowse/Browser.js index 8ef74b5092..9a01091ae1 100644 --- a/src/JBrowse/Browser.js +++ b/src/JBrowse/Browser.js @@ -74,6 +74,11 @@ var Browser = function(params) { dojo.connect( this, 'onRefSeqsLoaded', Util.debugHandler( this, 'reportUsageStats' )); }; +Browser.prototype.version = function() { + var BUILD_SYSTEM_JBROWSE_VERSION; + return BUILD_SYSTEM_JBROWSE_VERSION || 'development'; +}.call(); + /** * Displays links to configuration help in the main window. Called * when the main browser cannot run at all, due to configuration