-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetDiscordNetVersion.sh
executable file
·64 lines (52 loc) · 1.3 KB
/
setDiscordNetVersion.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
#!/bin/bash
#if [ "x$1" = "x" ]; then
# echo "version please"
# exit 1
#fi
oldVersion="3.8.0-dev-dev"
newVersion="3.8.0-dev"
#discordNetDirectory="~/dev/Discord.Net"
discordNetDirectory="/c/_stuff/dev/Discord.Net"
git rm Core/packages/*
mkdir Core/packages || true
#rm -rf ~/.nuget/packages/discord.net*
find "$discordNetDirectory" -name *.nupkg -exec cp {} Core/packages/ \;
rm Core/packages/0*
sed -i "s/$oldVersion/$newVersion/g" Core/Valkyrja.core.csproj
sed -i "s/$oldVersion/$newVersion/g" Bot/Valkyrja.discord.csproj
sed -i "s/$oldVersion/$newVersion/g" Modules/Valkyrja.modules.csproj
sed -i "s/$oldVersion/$newVersion/g" Secure/Valkyrja.secure.csproj
sed -i "s/$oldVersion/$newVersion/g" ServerSpecific/Valkyrja.specific.csproj
pushd Bot
dotnet restore
popd
pushd Modules
dotnet restore
popd
pushd Core
rm packages/Newtonsoft*
rm packages/idn*
rm packages/0*
git add packages/*
git add Valkyrja.core.csproj
git commit -m "D.NET Update"
git push
dotnet restore
popd
pushd Secure
git add Valkyrja.secure.csproj
git commit -m "D.NET Update"
git push
dotnet restore
popd
pushd ServerSpecific
git add Valkyrja.specific.csproj
git commit -m "D.NET Update"
git push
dotnet restore
popd
git add Bot/Valkyrja.discord.csproj
git add Modules/Valkyrja.modules.csproj
git commit -m "D.NET Update"
git push
echo "All done."