Skip to content

Commit 08a7c1c

Browse files
committed
Upgraded version and pack scripts
Bump version script now creates a commit automatically with the bump, because I always forget to do it In the same way I always forget to update the library version in the assembly so I've ended up uploading to nuget a package with a mismatching library version. Now the package script retrieves the version from the dll itself, so if I fail to upgrade it, the nuget-push will fail if i try to reupload an existing nuget package
1 parent 9e01e1e commit 08a7c1c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

bin/bump-version

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ case $COMMAND in
7777

7878
printf "New value: "
7979
eval $LIST_CMD
80+
81+
printf 'Saving change to git'
82+
git add ./src/IniFileParser/Properties/AssemblyInfo.cs
83+
git cm "Bumping version to $NEW_VERSION"
8084
;;
8185
esac
8286

bin/nuget-pack

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ xbuild src/INIFileParser.sln /nologo /verbosity:normal /p:Configuration=Release
77
# run tests
88
mono ./src/packages/NUnit.Runners.2.6.4/tools/nunit-console.exe -noxml -nodots -labels ./src/IniFileParser.Tests/bin/Release/IniFileParser.Tests.dll
99

10+
# strong sign assembly
11+
sn -R lib/INIFileParser.dll ./src/IniFileParser/Properties/publickey.snk
12+
1013
mkdir -p build
1114

15+
VERSION=$(monodis --assembly lib/INIFileParser.dll | grep Version | cut -d':' -f2 | tr -d ' ' | cut -c1-5)
16+
1217
# generate the nuget package
13-
mono --runtime=v4.0 ~/bin/NuGet.exe pack ./src/IniFileParser/INIFileParser.nuspec -NoDefaultExcludes -OutputDirectory ./build -Version $1
18+
mono --runtime=v4.0 ~/bin/NuGet.exe pack ./src/IniFileParser/INIFileParser.nuspec -NoDefaultExcludes -OutputDirectory ./build -Version $VERSION

0 commit comments

Comments
 (0)