You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
609 B
PowerShell
20 lines
609 B
PowerShell
$ErrorActionPreference="Stop"
|
|
|
|
$COZO_VERSION = cat Cargo.toml | select-string '([0-9.]+)' | select-string '^version' | ForEach-Object {
|
|
$_.Matches[0].Groups[1].Value
|
|
}
|
|
|
|
echo $COZO_VERSION
|
|
|
|
if (test-path release) {
|
|
Remove-Item -Recurse -Force release
|
|
}
|
|
|
|
mkdir release
|
|
|
|
cargo build --release
|
|
|
|
cp target/release/cozoserver.exe release/cozoserver-${COZO_VERSION}-windows-x86_64.exe
|
|
|
|
Compress-Archive -Path release/cozoserver-${COZO_VERSION}-windows-x86_64.exe -DestinationPath release/cozoserver-${COZO_VERSION}-windows-x86_64.zip
|
|
Remove-Item release/cozoserver-${COZO_VERSION}-windows-x86_64.exe |