39 lines
1.2 KiB
Bash
39 lines
1.2 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
PoloniumPath="./Polonium/"
|
|
PoloniumTasksPath="./Polonium.Tasks/"
|
|
PoloniumGeneratorsPath="./Polonium.Generators/"
|
|
PoloniumSdkPath="./Polonium.Sdk/"
|
|
VersionInfo="./VersionInfo.props"
|
|
|
|
RepoBase="https://git.hangman-lab.top/hzhang/"
|
|
Repos=("Polonium" "Polonium.Tasks" "Polonium.Generators" "Polonium.Sdk")
|
|
for repo in "${Repos[@]}"; do
|
|
if [ -d "./$repo/.git" ]; then
|
|
git -C "./$repo" pull
|
|
else
|
|
git clone "$RepoBase$repo.git"
|
|
fi
|
|
done
|
|
|
|
|
|
rm -f "${PoloniumPath}Package/build/VersionInfo.props"
|
|
rm -f "${PoloniumTasksPath}Package/build/VersionInfo.props"
|
|
rm -f "${PoloniumGeneratorsPath}VersionInfo.props"
|
|
rm -f "${PoloniumSdkPath}Sdk/VersionInfo.props"
|
|
|
|
cp "$VersionInfo" "${PoloniumPath}Package/build/VersionInfo.props"
|
|
cp "$VersionInfo" "${PoloniumTasksPath}Package/build/VersionInfo.props"
|
|
cp "$VersionInfo" "${PoloniumGeneratorsPath}VersionInfo.props"
|
|
cp "$VersionInfo" "${PoloniumSdkPath}Sdk/VersionInfo.props"
|
|
|
|
rm -rf ~/.nuget/packages/polonium*
|
|
|
|
for repo in "${Repos[@]}"; do
|
|
dotnet clean "./$repo/$repo.csproj"
|
|
dotnet restore "./$repo/$repo.csproj"
|
|
dotnet build "./$repo/$repo.csproj"
|
|
chmod +x "./$repo/publish"
|
|
bash "./$repo/publish"
|
|
done |