2
Fork 0
Code Issues 1 Pull requests 2 Wiki Activity
Var Dump:
dumpVar: only available in dev mode
Mailing List
dt-plugin-template/.ci/tasks/build.sh

41 lines
918 B
Bash
Executable file

#!/bin/bash
set -eu
if [ -n "$OUTPUT" ]; then
OUTPUT=$(realpath "$PWD/../$OUTPUT")
else
OUTPUT=$(mktemp -d)
fi
title() {
printf "\033[1m%s\033[0m\n" "$1"
}
install_artifact() {
for f in "$@"; do
echo "Installing: $f"
install -v -t "$OUTPUT/" "$f"
sha256sum "$f" > "$OUTPUT/$(basename "$f").sha256"
done
}
PR=${PR:-}
if [ -n "$PR" ]; then
title "PR: $(echo "$PR" | jq '.number') - $(echo "$PR" | jq '.title')"
ref="pr-$(echo "$PR" | jq '.number')-$(git rev-parse --short "$(cat .git/ref || echo "HEAD")" 2>/dev/null || echo 'manual')"
else
ref=$(git describe --tags --always)
fi
title "Version: '$ref'"
echo "$ref" > "$OUTPUT/version"
title "Building project"
cargo build --color always --locked --release --target x86_64-pc-windows-msvc -Zbuild-std
title "Installing artifacts"
install_artifact target/x86_64-pc-windows-msvc/release/*.dll
title "Done"