-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwise-version.bash
More file actions
executable file
·47 lines (37 loc) · 901 Bytes
/
wise-version.bash
File metadata and controls
executable file
·47 lines (37 loc) · 901 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Alexis Megas.
echo "The command sed may fail on MacOS."
VERSION=$1
if [ -z "$VERSION" ]
then
echo "Please specify the version: $0 <VERSION>."
exit 1
fi
if [ -r Distributions/*/control ]
then
for file in Distributions/*/control
do
sed -i "s/Version: .*/Version: $VERSION/" $file
done
fi
if [ -r Distributions/build* ]
then
for file in Distributions/build*
do
sed -i \
"s/Wise-[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+/Wise-$VERSION/" \
$file
done
fi
FILE="Android/AndroidManifest.xml"
sed -i \
's/\(android:versionCode="\)[0-9]\+\([0-9]\+\)*"/\1'"${VERSION//./}"'"/' \
$FILE
sed -i \
's/\(android:versionName="\)[0-9]\+\(\.[0-9]\+\)*"/\1'"$VERSION"'"/' \
$FILE
FILE="Source/wise.h"
sed -i \
's/\(WISE_VERSION_STRING "\)[0-9]\+\(\.[0-9]\+\)*"/\1'"$VERSION"'"/' \
$FILE
echo "Please modify ReleaseNotes.html."