forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bump.sh
executable file
·24 lines (19 loc) · 838 Bytes
/
bump.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "usage: bump.sh <version>"
exit 1
fi
v=$1
if [[ $v == *"-" ]]; then
echo "Version must not end with -"
exit 1
fi
sed -i 's/^version: .*/version: '$v'-{build}/' .appveyor.yml
sed -i 's/<VersionPrefix>[^<]*<\/VersionPrefix>/<VersionPrefix>'$v'<\/VersionPrefix>/' Directory.Build.props
sed -i 's/\(<Identity .*Version=\)"[^"]*"/\1"'$v'"/' src/VSIX/source.extension.vsixmanifest
sed -i 's/.*ProvideBindingRedirection.*/[assembly: ProvideBindingRedirection(AssemblyName = "Npgsql", NewVersion = "'$v'.0", OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = "'$v'.0")]/' src/VSIX/Properties/AssemblyInfo.cs
git add .appveyor.yml
git add Directory.Build.props
git add src/VSIX/source.extension.vsixmanifest
git add src/VSIX/Properties/AssemblyInfo.cs
git commit -m "Bump version to $v"