forked from bluefin18/NemCommunityClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbumpversion.bat
32 lines (25 loc) · 1.11 KB
/
bumpversion.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
rem batch files have funny escaping
rem
pushd nem-monitor
awk "{ if (match($0, /(.*\.)([0-9]+)(-BETA.*)/, arr)) { printf \"%%s%%d%%s\n\", arr[1], arr[2]+1, arr[3] } else { print } }" < pom.xml > pom.out
tr --delete "\r" < pom.out > pom.xml
rm pom.out
git add pom.xml
popd
pushd nem-client-download
awk "{ if (match($0, /(.*\.)([0-9]+)(-BETA.*)/, arr)) { printf \"%%s%%d%%s\n\", arr[1], arr[2]+1, arr[3] } else { print } }" < pom.xml > pom.out
tr --delete "\r" < pom.out > pom.xml
rm pom.out
git add pom.xml
popd
pushd nem-client-api
awk "{ if (match($0, /(.*\.)([0-9]+)(-BETA.*)/, arr)) { printf \"%%s%%d%%s\n\", arr[1], arr[2]+1, arr[3] } else { print } }" < pom.xml > pom.out
tr --delete "\r" < pom.out > pom.xml
rm pom.out
git add pom.xml
popd
awk "{ a=gensub(/(.*\.)([0-9]+)(-BETA.*)/,\"\\2\", \"g\",$0); if(a~/[0-9]+/) { gsub(/[0-9]+-BETA/, a+1\"-BETA\", $0);} print $0; }" < .travis.yml > .travis.out
tr --delete "\r" < .travis.out > .travis.yml
rm .travis.out
git add .travis.yml
sed -n "/BETA/{ s/.*\([0-9]\+.[0-9]\+.[0-9]\+-BETA\).*/bump version to \1/; p }" .travis.yml | xargs -iXX git commit -m XX