diff --git a/.amend.cmd b/.amend.cmd deleted file mode 100644 index bd37740f..00000000 --- a/.amend.cmd +++ /dev/null @@ -1,2 +0,0 @@ -echo off -echo .>.amend \ No newline at end of file diff --git a/_detect-amend.sh b/_detect-amend.sh new file mode 100644 index 00000000..428c6116 --- /dev/null +++ b/_detect-amend.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# This script detects whether git commit is being executed in amend or regular mode +# + +# 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 diff --git a/_pre-commit.sh b/_pre-commit.sh index 1b6d1326..1a8bf4f5 100644 --- a/_pre-commit.sh +++ b/_pre-commit.sh @@ -6,12 +6,16 @@ # .git/hooks/ with the following content: # #!/bin/sh # if [ -x ./_pre-commit.sh ]; then -# source ./_pre-commit.sh +# . ./_pre-commit.sh # fi 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; } +if [ -x ./_detect-amend.sh ]; then + . ./_detect-amend.sh +fi + VER=`git log --oneline | wc -l` # adjust so that we match the github commit count TAGVER=`expr $VER + 1` diff --git a/examples/wdi-simple.rc b/examples/wdi-simple.rc index 09ae25fc..b9d4d042 100644 --- a/examples/wdi-simple.rc +++ b/examples/wdi-simple.rc @@ -7,8 +7,8 @@ #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,717,0 - PRODUCTVERSION 1,3,717,0 + FILEVERSION 1,3,718,0 + PRODUCTVERSION 1,3,718,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -25,13 +25,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "WDI-Simple" - VALUE "FileVersion", "1.3.717" + VALUE "FileVersion", "1.3.718" VALUE "InternalName", "WDI-Simple" VALUE "LegalCopyright", "© 2010-2017 Pete Batard (LGPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html" VALUE "OriginalFilename", "wdi-simple.exe" VALUE "ProductName", "WDI-Simple" - VALUE "ProductVersion", "1.3.717" + VALUE "ProductVersion", "1.3.718" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/examples/zadic.rc b/examples/zadic.rc index 6af3736c..a2a634f5 100644 --- a/examples/zadic.rc +++ b/examples/zadic.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,717,0 - PRODUCTVERSION 1,3,717,0 + FILEVERSION 1,3,718,0 + PRODUCTVERSION 1,3,718,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,13 +74,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "Zadic" - VALUE "FileVersion", "1.3.717" + VALUE "FileVersion", "1.3.718" VALUE "InternalName", "Zadic" VALUE "LegalCopyright", "© 2010-2017 Pete Batard (LGPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html" VALUE "OriginalFilename", "zadic.exe" VALUE "ProductName", "Zadic" - VALUE "ProductVersion", "1.3.717" + VALUE "ProductVersion", "1.3.718" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/examples/zadig.h b/examples/zadig.h index 0a8a33dd..68d76486 100644 --- a/examples/zadig.h +++ b/examples/zadig.h @@ -59,7 +59,7 @@ #define FIELD_ORANGE RGB(255,240,200) #define ARROW_GREEN RGB(92,228,65) #define ARROW_ORANGE RGB(253,143,56) -#define APP_VERSION "Zadig 2.3.717" +#define APP_VERSION "Zadig 2.3.718" // These are used to flag end users about the driver they are going to replace enum driver_type { diff --git a/examples/zadig.rc b/examples/zadig.rc index 3595bfb6..846804a4 100644 --- a/examples/zadig.rc +++ b/examples/zadig.rc @@ -246,8 +246,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,3,717,0 - PRODUCTVERSION 2,3,717,0 + FILEVERSION 2,3,718,0 + PRODUCTVERSION 2,3,718,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -264,13 +264,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "Zadig" - VALUE "FileVersion", "2.3.717" + VALUE "FileVersion", "2.3.718" VALUE "InternalName", "Zadig" VALUE "LegalCopyright", "© 2010-2017 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "zadig.exe" VALUE "ProductName", "Zadig" - VALUE "ProductVersion", "2.3.717" + VALUE "ProductVersion", "2.3.718" VALUE "Comments", "http://libwdi.akeo.ie" END END diff --git a/libwdi/libwdi.rc b/libwdi/libwdi.rc index 44f33478..a565fb02 100644 --- a/libwdi/libwdi.rc +++ b/libwdi/libwdi.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,3,717,0 - PRODUCTVERSION 1,3,717,0 + FILEVERSION 1,3,718,0 + PRODUCTVERSION 1,3,718,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,13 +68,13 @@ BEGIN BEGIN VALUE "CompanyName", "akeo.ie" VALUE "FileDescription", "libwdi: Windows Driver Installer Library" - VALUE "FileVersion", "1.3.717" + VALUE "FileVersion", "1.3.718" VALUE "InternalName", "libwdi" VALUE "LegalCopyright", "© 2010-2017 Pete Batard (LGPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/lesser.html" VALUE "OriginalFilename", "libwdi" VALUE "ProductName", "libwdi" - VALUE "ProductVersion", "1.3.717" + VALUE "ProductVersion", "1.3.718" VALUE "Comments", "http://libwdi.akeo.ie" END END