fix: use sed to replace version in plist failed on macOS

This commit is contained in:
leo 2024-04-16 20:32:18 +08:00
parent b926dc055d
commit 27265dc465

View file

@ -5,9 +5,8 @@ version=`cat ./VERSION`
rm -rf SourceGit.app *.zip rm -rf SourceGit.app *.zip
mkdir -p SourceGit.app/Contents/Resources mkdir -p SourceGit.app/Contents/Resources
cp resources/app/App.plist SourceGit.app/Contents/Info.plist
cp resources/app/App.icns SourceGit.app/Contents/Resources/App.icns cp resources/app/App.icns SourceGit.app/Contents/Resources/App.icns
sed -i "s/SOURCE_GIT_VERSION/${version}/g" SourceGit.app/Contents/Info.plist sed "s/SOURCE_GIT_VERSION/${version}/g" resources/app/App.plist > SourceGit.app/Contents/Info.plist
mkdir -p SourceGit.app/Contents/MacOS mkdir -p SourceGit.app/Contents/MacOS
dotnet publish ../src/SourceGit.csproj -c Release -r osx-arm64 -o SourceGit.app/Contents/MacOS -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained dotnet publish ../src/SourceGit.csproj -c Release -r osx-arm64 -o SourceGit.app/Contents/MacOS -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained