-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrelease.sh
85 lines (59 loc) · 1.59 KB
/
release.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
TARGET="
net40
net48
"
if [ -z "$1" ]
then
version=$(git describe --abbrev=0 --tags)
else
version="$(date +%F)-nightly"
fi
echo "Current version is $version.."
sleep 1
echo "3.."
sleep 1
echo "2.."
sleep 1
echo "1.."
sleep 1
cd "./release"
"./FoxTunes.Release.exe" "$version"
cd ..
rm -f ./release/*.zip
for target in $TARGET
do
if [ ! -d "./release/$target" ]
then
echo "Source was not built: $target"
continue
fi
cd "./release/$target/Main"
echo "Setting the release type to default..";
sed -i 's/key="ReleaseType"\s\+value=".*"/key="ReleaseType" value="Default"/' "FoxTunes.Launcher.exe.config"
sed -i 's/key="ReleaseType"\s\+value=".*"/key="ReleaseType" value="Default"/' "FoxTunes.Launcher.x86.exe.config"
"../../../.7z/7za.exe" a "FoxTunes-$version-$target.zip" "*.*" -r
mv "./FoxTunes-$version-$target.zip" "../../"
cd ..
cd ..
cd ..
echo "Creating minimal package.."
cd "./release/$target/Minimal"
echo "Setting the release type to minimal..";
sed -i 's/key="ReleaseType"\s\+value=".*"/key="ReleaseType" value="Minimal"/' "FoxTunes.Launcher.exe.config"
sed -i 's/key="ReleaseType"\s\+value=".*"/key="ReleaseType" value="Minimal"/' "FoxTunes.Launcher.x86.exe.config"
"../../../.7z/7za.exe" a "FoxTunes-$version-$target-Minimal.zip" "*.*" -r
mv "./FoxTunes-$version-$target-Minimal.zip" "../../"
cd ..
cd ..
cd ..
echo "Creating plugins package.."
cd "./release/$target/Plugins"
"../../../.7z/7za.exe" a "FoxTunes-$version-Plugins-$target.zip" "*.*" -r
mv "./FoxTunes-$version-Plugins-$target.zip" "../../"
cd ..
cd ..
cd ..
done
echo
echo "All done."