diff --git a/backbone/gpi_pipeline_version.pro b/backbone/gpi_pipeline_version.pro index 0dba8926..4b5762bb 100644 --- a/backbone/gpi_pipeline_version.pro +++ b/backbone/gpi_pipeline_version.pro @@ -50,52 +50,41 @@ ; 2015-03-17 Release 1.3.0 ; 2016-06-14 Release 1.4.0 ; 2016-08-11 added /git option +; 2019-10-01 Release 1.5.0 ;- -function gpi_pipeline_version, svn=svn, git=git +function gpi_pipeline_version -version = '1.4.0' +version = '1.5.0' +codepath = gpi_get_directory('GPI_DRP_DIR') - -if keyword_set(svn) then begin - ; append svn version ID also, if possible - codepath = gpi_get_directory('GPI_DRP_DIR') - - if file_test(codepath+path_sep()+".svn",/directory) and ~lmgr(/runtime) then begin - cd, curr=curr - catch, myerror - if myerror eq 0 then begin - cd, codepath - spawn, 'svnversion', results,/noshell - svnid = results[n_elements(results)-1] ; take the last line of the result - ; this is in case we get multi-line output because e.g. the user - version += ", rev "+strc(svnid) - endif - cd, curr +; append svn version ID also, if possible +if file_test(codepath+path_sep()+".svn",/directory) and ~lmgr(/runtime) then begin + cd, curr=curr + catch, myerror + if myerror eq 0 then begin + cd, codepath + spawn, 'svnversion', results,/noshell + svnid = results[n_elements(results)-1] ; take the last line of the result + ; this is in case we get multi-line output because e.g. the user + version += ", rev "+strc(svnid) endif - + cd, curr endif -if keyword_set(git) then begin - ; append git short SHA hash also, if possible - codepath = gpi_get_directory('GPI_DRP_DIR') - - if file_test(codepath+path_sep()+".git",/directory) and ~lmgr(/runtime) then begin - cd, curr=curr - catch, myerror - if myerror eq 0 then begin - cd, codepath - spawn, 'git rev-parse --short HEAD', results - svnid = results[n_elements(results)-1] ; take the last line of the result - version += ", rev "+strc(svnid) - endif - cd, curr +; append git short SHA hash also, if possible +if file_test(codepath+path_sep()+".git",/directory) and ~lmgr(/runtime) then begin + cd, curr=curr + catch, myerror + if myerror eq 0 then begin + cd, codepath + spawn, 'git rev-parse --short HEAD', results + svnid = results[n_elements(results)-1] ; take the last line of the result + version += ", rev "+strc(svnid) endif - + cd, curr endif - - return, version end diff --git a/backbone/gpipipelinebackbone__define.pro b/backbone/gpipipelinebackbone__define.pro index d279362b..8a01710c 100644 --- a/backbone/gpipipelinebackbone__define.pro +++ b/backbone/gpipipelinebackbone__define.pro @@ -22,7 +22,7 @@ ;------------------------------------------------------------ pro gpipipelinebackbone::aboutmessage - ver = gpi_pipeline_version(/svn) + ver = gpi_pipeline_version() nspaces = 30 - strlen(ver) spaces = strmid(' ',0,nspaces) ; is there a better way to do this? @@ -35,8 +35,8 @@ pro gpipipelinebackbone::aboutmessage print, " * *" print, " * By the GPI Data Analysis Team *" print, " * *" - print, " * Perrin, Maire, Ingraham, Savransky, Doyon, *" - print, " * Chilcote, Draper, Fitzgerald, Greenbaum *" + print, " * Perrin, Maire, Ingraham, Savransky, De Rosa *" + print, " * Doyon, Chilcote, Draper, Fitzgerald, Greenbaum *" print, " * Hibon, Konopacky, Long, Marois, Marchis *" print, " * Millar-Blanchaer, Nielsen, Pueyo, *" print, " * Ruffio, Sadakuni, Wang, Wolff, & Wiktorowicz *" @@ -114,7 +114,7 @@ FUNCTION gpipipelinebackbone::Init, session=session, verbose=verbose, nogui=nog if ~(keyword_set(self.nogui)) then begin self->SetupStatusConsole self.statuswindow->display_log,"* GPI DATA REDUCTION PIPELINE *" - self.statuswindow->display_log,"* VERSION "+gpi_pipeline_version(/svn)+" *" + self.statuswindow->display_log,"* VERSION "+gpi_pipeline_version()+" *" self.statuswindow->set_calibdir, self.GPICalDB->get_calibdir() endif @@ -847,7 +847,7 @@ FUNCTION gpiPipelineBackbone::load_FITS_file, indexFrame ; is required. ;SXADDPAR, *(*self.data).HeadersExt[IndexFrame], "END",'' - self->set_keyword, "HISTORY", "Reduction with GPI Data Pipeline version "+gpi_pipeline_version(/svn) + self->set_keyword, "HISTORY", "Reduction with GPI Data Pipeline version "+gpi_pipeline_version() self->set_keyword, "HISTORY", " Started On " + SYSTIME(0) self->set_keyword, "HISTORY", " User: "+getenv('USER')+ " Hostname: "+getenv('HOST') return, OK @@ -986,7 +986,7 @@ PRO gpiPipelineBackbone::OpenLog OPENW, new_LUN, LogFile, /GET_LUN,/APPEND self.LOG_GENERAL = new_LUN PRINTF, self.LOG_GENERAL, '--------------------------------------------------------------' - PRINTF, self.LOG_GENERAL, ' GPI Data Reduction Pipeline, version '+gpi_pipeline_version(/svn) + PRINTF, self.LOG_GENERAL, ' GPI Data Reduction Pipeline, version '+gpi_pipeline_version() PRINTF, self.LOG_GENERAL, ' Started On ' + SYSTIME(0) PRINTF, self.LOG_GENERAL, ' User: '+user+ " Hostname: "+computer PRINTF, self.LOG_GENERAL, '' diff --git a/gpitv/gpitv__define.pro b/gpitv/gpitv__define.pro index c6dec097..ef4ce571 100644 --- a/gpitv/gpitv__define.pro +++ b/gpitv/gpitv__define.pro @@ -1753,7 +1753,7 @@ pro GPItv::topmenu_event, event 'Developer Guide': gpi_open_help,'developers/gpitv_devel.html' 'About': begin - tmpstr=['GPItv Version: '+strc(gpi_pipeline_version(/svn)), $ + tmpstr=['GPItv Version: '+strc(gpi_pipeline_version()), $ '', $ 'GPItv is a modified version of the package ATV written by Aaron Barth.',$ 'http://www.physics.uci.edu/~barth/atv/',$ diff --git a/utils/gpi_compiler.pro b/utils/gpi_compiler.pro index 13ca0f19..33879d78 100644 --- a/utils/gpi_compiler.pro +++ b/utils/gpi_compiler.pro @@ -329,7 +329,7 @@ message,/info, "Now cleaning up and organizing the output files..." ; compute version string including major+minor version number and svn revision ; ID if possible. -version_parts = strsplit(gpi_pipeline_version(/svn),', :',/extract) +version_parts = strsplit(gpi_pipeline_version(),', :',/extract) if n_elements(version_parts) eq 1 then version_string = version_parts[0] else version_string = version_parts[0]+"_r"+version_parts[2] diff --git a/utils/gpi_drp_about_message.pro b/utils/gpi_drp_about_message.pro index b949de9a..ebdef04c 100644 --- a/utils/gpi_drp_about_message.pro +++ b/utils/gpi_drp_about_message.pro @@ -9,7 +9,7 @@ function gpi_drp_about_message - ver=(gpi_pipeline_version(/git)) + ver=(gpi_pipeline_version()) tmpstr=['GPI Data Reduction Pipeline Version: '+ver, $ '', $ 'Copyright 2008-2016, by the GPI Team & AURA', $