mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	add the git commit information with xCAT version
This commit is contained in:
		| @@ -1,20 +1,21 @@ | ||||
| #!/bin/sh | ||||
| # Put the version, svn revision #, and build date into the Version function in Version.pm | ||||
|  | ||||
| if [ -z "$1" ] | ||||
| if [ -z "$2" ] | ||||
| 	then | ||||
| 	echo "modifyUtils:  Error:  must specify the xCAT version as an argument" >&2 | ||||
| 	exit | ||||
| fi | ||||
|  | ||||
| VER=$1 | ||||
| GITREF="git commit $2, " | ||||
|  | ||||
| BUILDDATE=`date` | ||||
| #echo ". '(built $BUILDDATE)'" | ||||
|  | ||||
| if [ "$(uname)" = "AIX" ] | ||||
| then | ||||
| 	sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new | ||||
| 	sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${GITREF}built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new | ||||
| 	mv xCAT/Version.pm.new xCAT/Version.pm | ||||
| else | ||||
|         if [ -f "/etc/debian_version" ];then | ||||
| @@ -22,5 +23,5 @@ else | ||||
|         else | ||||
|             FILENAME="xCAT/Version.pm" | ||||
|         fi | ||||
| 	sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (built $BUILDDATE)'"/ $FILENAME | ||||
| 	sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${GITREF}built $BUILDDATE)'"/ $FILENAME | ||||
| fi | ||||
|   | ||||
							
								
								
									
										4
									
								
								perl-xCAT/perl-xCAT.spec
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										4
									
								
								perl-xCAT/perl-xCAT.spec
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -23,6 +23,8 @@ Provides: perl-xCAT = %{epoch}:%{version} | ||||
| Provides perl xCAT libraries for core functionality.  Required for all xCAT installations. | ||||
| Includes xCAT::Table, xCAT::NodeRange, among others. | ||||
|  | ||||
| %define gitinfo %(git log -n 1 | head -n 1 | cut -f 2 -d ' ') | ||||
|  | ||||
| %define zvm %(if [ "$zvm" = "1" ];then echo 1; else echo 0; fi) | ||||
| %define fsm %(if [ "$fsm" = "1" ];then echo 1; else echo 0; fi) | ||||
|  | ||||
| @@ -36,7 +38,7 @@ Includes xCAT::Table, xCAT::NodeRange, among others. | ||||
| %if %fsm | ||||
| %else | ||||
| # Modify the Version() function in xCAT/Utils.pm to automatically have the correct version | ||||
| ./modifyUtils %{version} | ||||
| ./modifyUtils %{version} %{gitinfo} | ||||
|  | ||||
| # Build the pod version of the man pages for each DB table.  It puts them in the man5 and man7 subdirs. | ||||
| # Then convert the pods to man pages and html pages. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user