mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[internal] add auto detection of 'git commit --amend'
* Finally! * Also improve UPX compression
This commit is contained in:
		
							parent
							
								
									9815a18009
								
							
						
					
					
						commit
						63555cd04d
					
				
					 7 changed files with 33 additions and 11 deletions
				
			
		|  | @ -1,2 +0,0 @@ | ||||||
| echo off |  | ||||||
| echo .>.amend |  | ||||||
|  | @ -9,7 +9,7 @@ release: all | ||||||
| 	@mv src/$(TARGET)$(EXEEXT) . | 	@mv src/$(TARGET)$(EXEEXT) . | ||||||
| 	@sleep 1 | 	@sleep 1 | ||||||
| 	@$(STRIP) $(TARGET)$(EXEEXT) | 	@$(STRIP) $(TARGET)$(EXEEXT) | ||||||
| 	@upx --lzma $(TARGET)$(EXEEXT) | 	@upx --lzma --best $(TARGET)$(EXEEXT) | ||||||
| 	@mv $(TARGET)$(EXEEXT) $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | 	@mv $(TARGET)$(EXEEXT) $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | ||||||
| 	@cmd.exe //c _sign.cmd $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | 	@cmd.exe //c _sign.cmd $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -506,7 +506,7 @@ release: all | ||||||
| 	@mv src/$(TARGET)$(EXEEXT) . | 	@mv src/$(TARGET)$(EXEEXT) . | ||||||
| 	@sleep 1 | 	@sleep 1 | ||||||
| 	@$(STRIP) $(TARGET)$(EXEEXT) | 	@$(STRIP) $(TARGET)$(EXEEXT) | ||||||
| 	@upx --lzma $(TARGET)$(EXEEXT) | 	@upx --lzma --best $(TARGET)$(EXEEXT) | ||||||
| 	@mv $(TARGET)$(EXEEXT) $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | 	@mv $(TARGET)$(EXEEXT) $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | ||||||
| 	@cmd.exe //c _sign.cmd $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | 	@cmd.exe //c _sign.cmd $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										20
									
								
								_detect-amend.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								_detect-amend.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,20 @@ | ||||||
|  | #!/bin/sh | ||||||
|  | # | ||||||
|  | # This script detects whether git commit is being executed in amend or regular mode | ||||||
|  | # Needed to determine whether the build number should be incremented or not. | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | # Need to figure out if we are running on Windows or *NIX | ||||||
|  | if [ "$(uname -o)" = "Msys" ]; then | ||||||
|  |   type -P wmic &>/dev/null || { echo "wmic command not found. Aborting." >&2; exit 1; } | ||||||
|  |   type -P grep &>/dev/null || { echo "grep command not found. Aborting." >&2; exit 1; } | ||||||
|  |   if $(wmic path win32_process get CommandLine | grep git.exe | grep -q -- --amend); then | ||||||
|  |     echo AMEND detected | ||||||
|  |     touch ./.amend | ||||||
|  |   fi | ||||||
|  | else | ||||||
|  |   if $(ps -fp $PPID | grep -q -- --amend); then | ||||||
|  |     echo AMEND detected | ||||||
|  |     touch ./.amend | ||||||
|  |   fi | ||||||
|  | fi | ||||||
|  | @ -6,7 +6,7 @@ | ||||||
| # .git/hooks/ with the following content: | # .git/hooks/ with the following content: | ||||||
| # #!/bin/sh | # #!/bin/sh | ||||||
| # if [ -x ./_post-commit.sh ]; then | # if [ -x ./_post-commit.sh ]; then | ||||||
| # 	source ./_post-commit.sh | # 	. ./_post-commit.sh | ||||||
| # fi | # fi | ||||||
| 
 | 
 | ||||||
| type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; } | type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; } | ||||||
|  |  | ||||||
|  | @ -6,12 +6,16 @@ | ||||||
| # .git/hooks/ with the following content: | # .git/hooks/ with the following content: | ||||||
| # #!/bin/sh | # #!/bin/sh | ||||||
| # if [ -x ./_pre-commit.sh ]; then | # if [ -x ./_pre-commit.sh ]; then | ||||||
| # 	source ./_pre-commit.sh | # 	. ./_pre-commit.sh | ||||||
| # fi | # fi | ||||||
| 
 | 
 | ||||||
| type -P sed &>/dev/null || { echo "sed command not found. Aborting." >&2; exit 1; } | type -P sed &>/dev/null || { echo "sed command not found. Aborting." >&2; exit 1; } | ||||||
| type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; } | type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; } | ||||||
| 
 | 
 | ||||||
|  | if [ -x ./_detect-amend.sh ]; then | ||||||
|  | 	. ./_detect-amend.sh | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| TAGVER=`git rev-list HEAD --count` | TAGVER=`git rev-list HEAD --count` | ||||||
| # adjust so that we match the github commit count | # adjust so that we match the github commit count | ||||||
| ((TAGVER++)) | ((TAGVER++)) | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 232, 326 | IDD_DIALOG DIALOGEX 12, 12, 232, 326 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| EXSTYLE WS_EX_ACCEPTFILES | EXSTYLE WS_EX_ACCEPTFILES | ||||||
| CAPTION "Rufus 3.0.1276" | CAPTION "Rufus 3.0.1277" | ||||||
| FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP |     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP | ||||||
|  | @ -389,8 +389,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 3,0,1276,0 |  FILEVERSION 3,0,1277,0 | ||||||
|  PRODUCTVERSION 3,0,1276,0 |  PRODUCTVERSION 3,0,1277,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -407,13 +407,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" |             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "3.0.1276" |             VALUE "FileVersion", "3.0.1277" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" |             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||||
|             VALUE "OriginalFilename", "rufus.exe" |             VALUE "OriginalFilename", "rufus.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "3.0.1276" |             VALUE "ProductVersion", "3.0.1277" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue