-
Notifications
You must be signed in to change notification settings - Fork 3
/
justfile
41 lines (36 loc) · 1.27 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
build target="aarch64-apple-darwin":
cargo build --bin ion --release -F bin --target {{target}}
tarball target="aarch64-apple-darwin":
#!/usr/bin/env bash
DIST="target/{{target}}/dist"
VERSION="$(cargo xtask version)"
NAME="ion-v${VERSION}-{{target}}"
mkdir -p $DIST
mkdir -p $DIST/bin
cp target/{{target}}/release/ion $DIST/bin/ion
cd target/{{target}} && tar -czf ${NAME}.tar.gz dist
ARCHIVE="target/{{target}}/${NAME}.tar.gz"
echo "::set-output name=archive::$ARCHIVE"
delete-release tag:
gh release delete v{{tag}} -y
git push --delete origin v{{tag}}
release tag:
#!/usr/bin/env bash
cargo xtask bump {{tag}}
VERSION="$(cargo xtask version)"
git add Cargo.toml
git diff --quiet Cargo.toml && git diff --staged --quiet || git commit -m "Bump version to ${VERSION}"
git pull origin main
git push origin main
gh release create "v${VERSION}" -t "v${VERSION}" --generate-notes
[macos]
install prefix="$HOME/.local":
cargo build --bin ion --release -F bin
mkdir -p {{prefix}}/bin
cp target/release/ion {{prefix}}/bin
[linux]
install prefix="$HOME/.local":
#!/usr/bin/env bash
cargo build --bin ion --release -F bin
mkdir -p {{prefix}}/bin
cp target/release/ion {{prefix}}/bin/ion