Add release packaging and automatic update support
This commit is contained in:
parent
94cd6b984b
commit
f971c374f8
20 changed files with 722 additions and 16 deletions
17
packaging/release.sh
Normal file
17
packaging/release.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
version="${1:-$(sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p' Directory.Build.props | tr -d '\r')}"
|
||||
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo 'Use a stable version such as 1.0.0.' >&2; exit 1; }
|
||||
export DOTNET_CLI_HOME="$PWD/.tools/home-linux"
|
||||
export NUGET_PACKAGES="$PWD/.tools/packages-linux"
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
mkdir -p .tools/feed
|
||||
dotnet tool restore
|
||||
publish="$PWD/artifacts/publish/$version/linux-x64"
|
||||
output="$PWD/artifacts/releases/linux-x64"
|
||||
[[ ! -e "$publish" ]] || { echo "Publish folder already exists: $publish" >&2; exit 1; }
|
||||
dotnet publish src/AstroFrame.Desktop -c Release -r linux-x64 --self-contained true "-p:Version=$version" -o "$publish"
|
||||
dotnet tool run vpk -- '[linux]' pack --packId AstroFrame --packTitle AstroFrame --packAuthors 'Elijah Kuntz' --packVersion "$version" --packDir "$publish" --mainExe AstroFrame.Desktop --runtime linux-x64 --channel linux-x64 --icon src/AstroFrame.Desktop/Assets/astroframe.png --categories 'Science;Astronomy;' --outputDir "$output"
|
||||
cp packaging/install-linux.sh src/AstroFrame.Desktop/Assets/astroframe.png "$output/"
|
||||
echo "Release $version built in $output. See docs/releases.md before publishing."
|
||||
Loading…
Add table
Add a link
Reference in a new issue