init.sh
· 451 B · Bash
Raw
# Create solution.
rm *.sln
dotnet new sln
find . -name *.csproj | xargs -I {} dotnet sln add {}
# Build projects
find . -name *.csproj | xargs -I {} dotnet publish {} -r win-x64 -c Release --self-contained
# Push all
for dir1 in ./*; do
if [ -d "$dir1" ]; then
echo "Pushing $dir1"
cd "$dir1"
git add .
git commit -m "Upgrade to .NET 8"
git push
# 返回到原始目录
cd ..
fi
done
1 | # Create solution. |
2 | rm *.sln |
3 | dotnet new sln |
4 | find . -name *.csproj | xargs -I {} dotnet sln add {} |
5 | |
6 | # Build projects |
7 | find . -name *.csproj | xargs -I {} dotnet publish {} -r win-x64 -c Release --self-contained |
8 | |
9 | # Push all |
10 | for dir1 in ./*; do |
11 | if [ -d "$dir1" ]; then |
12 | echo "Pushing $dir1" |
13 | cd "$dir1" |
14 | git add . |
15 | git commit -m "Upgrade to .NET 8" |
16 | git push |
17 | # 返回到原始目录 |
18 | cd .. |
19 | fi |
20 | done |
21 |