mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[internal] update hooks to remove automated tagging
* Also update AppVeyor builds wrt the above
This commit is contained in:
parent
bc6e23ec11
commit
6d7a938058
5 changed files with 16 additions and 54 deletions
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Creates a tag according to the number of commits on this branch
|
|
||||||
#
|
|
||||||
# To have git run this script on commit, create a "post-commit" text file in
|
|
||||||
# .git/hooks/ with the following content:
|
|
||||||
# #!/bin/sh
|
|
||||||
# if [ -x ./_post-commit.sh ]; then
|
|
||||||
# . ./_post-commit.sh
|
|
||||||
# fi
|
|
||||||
|
|
||||||
type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; }
|
|
||||||
|
|
||||||
TAGVER=`cat ./.tag`
|
|
||||||
# Only apply a tag if we're dealing with the master branch
|
|
||||||
if [ "`git rev-parse --abbrev-ref HEAD`" == "master" ]; then
|
|
||||||
git tag "b$TAGVER"
|
|
||||||
fi
|
|
||||||
rm ./.tag
|
|
|
@ -16,28 +16,26 @@ if [ -x ./_detect-amend.sh ]; then
|
||||||
. ./_detect-amend.sh
|
. ./_detect-amend.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TAGVER=`git rev-list HEAD --count`
|
BUILD=`git rev-list HEAD --count`
|
||||||
# adjust so that we match the github commit count
|
# adjust so that we match the github commit count
|
||||||
((TAGVER++))
|
((BUILD++))
|
||||||
# there may be a better way to prevent improper micro on amend. For now the detection
|
# there may be a better way to prevent improper micro on amend. For now the detection
|
||||||
# of a .amend file in the current directory will do
|
# of a .amend file in the current directory will do
|
||||||
if [ -f ./.amend ]; then
|
if [ -f ./.amend ]; then
|
||||||
((TAGVER--))
|
((BUILD--))
|
||||||
git tag -d "b$TAGVER"
|
|
||||||
rm ./.amend;
|
rm ./.amend;
|
||||||
fi
|
fi
|
||||||
echo "setting micro to $TAGVER"
|
echo "setting micro to $BUILD"
|
||||||
echo $TAGVER > .tag
|
|
||||||
|
|
||||||
cat > cmd.sed <<\_EOF
|
cat > cmd.sed <<\_EOF
|
||||||
s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@TAGVER@@,\6/
|
s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@BUILD@@,\6/
|
||||||
s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@TAGVER@@"/
|
s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@BUILD@@"/
|
||||||
s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@TAGVER@@"\3/
|
s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@BUILD@@"\3/
|
||||||
s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@TAGVER@@.\4"\5/
|
s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@BUILD@@.\4"\5/
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
# First run sed to substitute our variable in the sed command file
|
# First run sed to substitute our variable in the sed command file
|
||||||
sed -i -e "s/@@TAGVER@@/$TAGVER/g" cmd.sed
|
sed -i -e "s/@@BUILD@@/$BUILD/g" cmd.sed
|
||||||
# Run sed to update the nano version
|
# Run sed to update the nano version
|
||||||
sed -b -i -f cmd.sed src/rufus.rc
|
sed -b -i -f cmd.sed src/rufus.rc
|
||||||
# NB: we need to run git add else the modified files may be ignored
|
# NB: we need to run git add else the modified files may be ignored
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Sets the git hooks on a new git development system
|
# Sets the git hooks on a new git development system
|
||||||
if [ -e ".git/hooks/pre-commit" ] || [ -e ".git/hooks/post-commit" ] ; then
|
if [ -e ".git/hooks/pre-commit" ]; then
|
||||||
echo 'pre-commit or post-commit git hook is already set, aborting.'
|
echo 'pre-commit git hook is already set, aborting.'
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -10,9 +10,3 @@ echo '#!/bin/sh' > .git/hooks/pre-commit
|
||||||
echo 'if [ -x ./_pre-commit.sh ]; then' >> .git/hooks/pre-commit
|
echo 'if [ -x ./_pre-commit.sh ]; then' >> .git/hooks/pre-commit
|
||||||
echo ' . ./_pre-commit.sh' >> .git/hooks/pre-commit
|
echo ' . ./_pre-commit.sh' >> .git/hooks/pre-commit
|
||||||
echo 'fi' >> .git/hooks/pre-commit
|
echo 'fi' >> .git/hooks/pre-commit
|
||||||
|
|
||||||
echo 'Creating post-commit git hook...'
|
|
||||||
echo '#!/bin/sh' > .git/hooks/post-commit
|
|
||||||
echo 'if [ -x ./_post-commit.sh ]; then' >> .git/hooks/post-commit
|
|
||||||
echo ' . ./_post-commit.sh' >> .git/hooks/post-commit
|
|
||||||
echo 'fi' >> .git/hooks/post-commit
|
|
||||||
|
|
11
appveyor.yml
11
appveyor.yml
|
@ -1,8 +1,5 @@
|
||||||
os: Visual Studio 2017
|
os: Visual Studio 2017
|
||||||
|
|
||||||
# May choose to enable the following if we get tired of seeing double AppVeyor builds for tagged and untagged
|
|
||||||
# skip_non_tags: true
|
|
||||||
|
|
||||||
skip_commits:
|
skip_commits:
|
||||||
# Don't run AppVeyor for commits that only modify resource or non-code files
|
# Don't run AppVeyor for commits that only modify resource or non-code files
|
||||||
files:
|
files:
|
||||||
|
@ -55,10 +52,6 @@ init:
|
||||||
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)_#$env:APPVEYOR_BUILD_NUMBER";
|
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)_#$env:APPVEYOR_BUILD_NUMBER";
|
||||||
} else {
|
} else {
|
||||||
Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0,8))_#$env:APPVEYOR_BUILD_NUMBER";
|
Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0,8))_#$env:APPVEYOR_BUILD_NUMBER";
|
||||||
if ("$env:APPVEYOR_REPO_NAME" -eq "pbatard/rufus" -and "$env:APPVEYOR_REPO_BRANCH" -eq "master") {
|
|
||||||
Write-Output "Not running dev-build since we expect a tagged commit.";
|
|
||||||
Exit-AppVeyorBuild;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
@ -88,10 +81,6 @@ build_script:
|
||||||
Write-Output "Not running Coverity due to missing credential.";
|
Write-Output "Not running Coverity due to missing credential.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($env:APPVEYOR_REPO_TAG -eq "false") {
|
|
||||||
Write-Output "Not running Coverity due to missing tag.";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
& nuget install PublishCoverity -o "$env:APPVEYOR_BUILD_FOLDER" -excludeversion;
|
& nuget install PublishCoverity -o "$env:APPVEYOR_BUILD_FOLDER" -excludeversion;
|
||||||
& cov-build.exe --dir cov-int msbuild rufus.sln /m /p:Configuration=$env:CONFIGURATION,Platform=$env:PLATFORM /l:$APPVEYOR_LOGGER;
|
& cov-build.exe --dir cov-int msbuild rufus.sln /m /p:Configuration=$env:CONFIGURATION,Platform=$env:PLATFORM /l:$APPVEYOR_LOGGER;
|
||||||
& $PUBLISHCOVERITY compress --nologo -i "$env:APPVEYOR_BUILD_FOLDER\cov-int" -o "$env:APPVEYOR_BUILD_FOLDER\coverity.zip" --overwrite;
|
& $PUBLISHCOVERITY compress --nologo -i "$env:APPVEYOR_BUILD_FOLDER\cov-int" -o "$env:APPVEYOR_BUILD_FOLDER\coverity.zip" --overwrite;
|
||||||
|
|
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.4.1408"
|
CAPTION "Rufus 3.4.1409"
|
||||||
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
|
||||||
|
@ -392,8 +392,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 3,4,1408,0
|
FILEVERSION 3,4,1409,0
|
||||||
PRODUCTVERSION 3,4,1408,0
|
PRODUCTVERSION 3,4,1409,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -411,13 +411,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://akeo.ie"
|
VALUE "Comments", "https://akeo.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "3.4.1408"
|
VALUE "FileVersion", "3.4.1409"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus-3.4.exe"
|
VALUE "OriginalFilename", "rufus-3.4.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "3.4.1408"
|
VALUE "ProductVersion", "3.4.1409"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue