Skip to content

Commit 6d7a938

Browse files
committed
[internal] update hooks to remove automated tagging
* Also update AppVeyor builds wrt the above
1 parent bc6e23e commit 6d7a938

File tree

5 files changed

+16
-54
lines changed

5 files changed

+16
-54
lines changed

_post-commit.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

_pre-commit.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,26 @@ if [ -x ./_detect-amend.sh ]; then
1616
. ./_detect-amend.sh
1717
fi
1818

19-
TAGVER=`git rev-list HEAD --count`
19+
BUILD=`git rev-list HEAD --count`
2020
# adjust so that we match the github commit count
21-
((TAGVER++))
21+
((BUILD++))
2222
# there may be a better way to prevent improper micro on amend. For now the detection
2323
# of a .amend file in the current directory will do
2424
if [ -f ./.amend ]; then
25-
((TAGVER--))
26-
git tag -d "b$TAGVER"
25+
((BUILD--))
2726
rm ./.amend;
2827
fi
29-
echo "setting micro to $TAGVER"
30-
echo $TAGVER > .tag
28+
echo "setting micro to $BUILD"
3129

3230
cat > cmd.sed <<\_EOF
33-
s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@TAGVER@@,\6/
34-
s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@TAGVER@@"/
35-
s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@TAGVER@@"\3/
36-
s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@TAGVER@@.\4"\5/
31+
s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@BUILD@@,\6/
32+
s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@BUILD@@"/
33+
s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@BUILD@@"\3/
34+
s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@BUILD@@.\4"\5/
3735
_EOF
3836

3937
# First run sed to substitute our variable in the sed command file
40-
sed -i -e "s/@@TAGVER@@/$TAGVER/g" cmd.sed
38+
sed -i -e "s/@@BUILD@@/$BUILD/g" cmd.sed
4139
# Run sed to update the nano version
4240
sed -b -i -f cmd.sed src/rufus.rc
4341
# NB: we need to run git add else the modified files may be ignored

_set_git_hooks.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22
# Sets the git hooks on a new git development system
3-
if [ -e ".git/hooks/pre-commit" ] || [ -e ".git/hooks/post-commit" ] ; then
4-
echo 'pre-commit or post-commit git hook is already set, aborting.'
3+
if [ -e ".git/hooks/pre-commit" ]; then
4+
echo 'pre-commit git hook is already set, aborting.'
55
exit
66
fi
77

@@ -10,9 +10,3 @@ echo '#!/bin/sh' > .git/hooks/pre-commit
1010
echo 'if [ -x ./_pre-commit.sh ]; then' >> .git/hooks/pre-commit
1111
echo ' . ./_pre-commit.sh' >> .git/hooks/pre-commit
1212
echo 'fi' >> .git/hooks/pre-commit
13-
14-
echo 'Creating post-commit git hook...'
15-
echo '#!/bin/sh' > .git/hooks/post-commit
16-
echo 'if [ -x ./_post-commit.sh ]; then' >> .git/hooks/post-commit
17-
echo ' . ./_post-commit.sh' >> .git/hooks/post-commit
18-
echo 'fi' >> .git/hooks/post-commit

appveyor.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
os: Visual Studio 2017
22

3-
# May choose to enable the following if we get tired of seeing double AppVeyor builds for tagged and untagged
4-
# skip_non_tags: true
5-
63
skip_commits:
74
# Don't run AppVeyor for commits that only modify resource or non-code files
85
files:
@@ -55,10 +52,6 @@ init:
5552
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME)_#$env:APPVEYOR_BUILD_NUMBER";
5653
} else {
5754
Update-AppveyorBuild -Version "dev-$($env:APPVEYOR_REPO_COMMIT.Substring(0,8))_#$env:APPVEYOR_BUILD_NUMBER";
58-
if ("$env:APPVEYOR_REPO_NAME" -eq "pbatard/rufus" -and "$env:APPVEYOR_REPO_BRANCH" -eq "master") {
59-
Write-Output "Not running dev-build since we expect a tagged commit.";
60-
Exit-AppVeyorBuild;
61-
}
6255
}
6356
6457
build:
@@ -88,10 +81,6 @@ build_script:
8881
Write-Output "Not running Coverity due to missing credential.";
8982
return;
9083
}
91-
if ($env:APPVEYOR_REPO_TAG -eq "false") {
92-
Write-Output "Not running Coverity due to missing tag.";
93-
return;
94-
}
9584
& nuget install PublishCoverity -o "$env:APPVEYOR_BUILD_FOLDER" -excludeversion;
9685
& cov-build.exe --dir cov-int msbuild rufus.sln /m /p:Configuration=$env:CONFIGURATION,Platform=$env:PLATFORM /l:$APPVEYOR_LOGGER;
9786
& $PUBLISHCOVERITY compress --nologo -i "$env:APPVEYOR_BUILD_FOLDER\cov-int" -o "$env:APPVEYOR_BUILD_FOLDER\coverity.zip" --overwrite;

src/rufus.rc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
3333
IDD_DIALOG DIALOGEX 12, 12, 232, 326
3434
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
3535
EXSTYLE WS_EX_ACCEPTFILES
36-
CAPTION "Rufus 3.4.1408"
36+
CAPTION "Rufus 3.4.1409"
3737
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
3838
BEGIN
3939
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@@ -392,8 +392,8 @@ END
392392
//
393393

394394
VS_VERSION_INFO VERSIONINFO
395-
FILEVERSION 3,4,1408,0
396-
PRODUCTVERSION 3,4,1408,0
395+
FILEVERSION 3,4,1409,0
396+
PRODUCTVERSION 3,4,1409,0
397397
FILEFLAGSMASK 0x3fL
398398
#ifdef _DEBUG
399399
FILEFLAGS 0x1L
@@ -411,13 +411,13 @@ BEGIN
411411
VALUE "Comments", "https://akeo.ie"
412412
VALUE "CompanyName", "Akeo Consulting"
413413
VALUE "FileDescription", "Rufus"
414-
VALUE "FileVersion", "3.4.1408"
414+
VALUE "FileVersion", "3.4.1409"
415415
VALUE "InternalName", "Rufus"
416416
VALUE "LegalCopyright", "� 2011-2018 Pete Batard (GPL v3)"
417417
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
418418
VALUE "OriginalFilename", "rufus-3.4.exe"
419419
VALUE "ProductName", "Rufus"
420-
VALUE "ProductVersion", "3.4.1408"
420+
VALUE "ProductVersion", "3.4.1409"
421421
END
422422
END
423423
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)