Add recipes to build binaries for release (#131)
This commit is contained in:
parent
0195a15e68
commit
da8108f19d
26
justfile
26
justfile
@ -24,7 +24,7 @@ version = `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/v\1/p' Cargo.tom
|
|||||||
publish: lint clippy test
|
publish: lint clippy test
|
||||||
git branch | grep '* master'
|
git branch | grep '* master'
|
||||||
git diff --no-ext-diff --quiet --exit-code
|
git diff --no-ext-diff --quiet --exit-code
|
||||||
git co -b {{version}}
|
git checkout -b {{version}}
|
||||||
git push github
|
git push github
|
||||||
cargo publish
|
cargo publish
|
||||||
git tag -a {{version}} -m {{version}}
|
git tag -a {{version}} -m {{version}}
|
||||||
@ -32,6 +32,30 @@ publish: lint clippy test
|
|||||||
git push origin --tags
|
git push origin --tags
|
||||||
@echo 'Remember to merge the {{version}} branch on GitHub!'
|
@echo 'Remember to merge the {{version}} branch on GitHub!'
|
||||||
|
|
||||||
|
build-binary-mac VERSION:
|
||||||
|
just build-binary {{VERSION}} x86_64-apple-darwin
|
||||||
|
|
||||||
|
build-binary-linux VERSION:
|
||||||
|
just build-binary {{VERSION}} x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
build-binary VERSION TARGET:
|
||||||
|
git diff --no-ext-diff --quiet --exit-code
|
||||||
|
git checkout {{VERSION}}
|
||||||
|
cargo build --release --target={{TARGET}}
|
||||||
|
rm -rf tmp/just-{{VERSION}}-{{TARGET}}
|
||||||
|
rm -rf tmp/just-{{VERSION}}-{{TARGET}}.tar.gz
|
||||||
|
mkdir tmp/just-{{VERSION}}-{{TARGET}}
|
||||||
|
cp \
|
||||||
|
GRAMMAR.md \
|
||||||
|
LICENSE.md \
|
||||||
|
README.md \
|
||||||
|
target/release/just \
|
||||||
|
tmp/just-{{VERSION}}-{{TARGET}}
|
||||||
|
cd tmp && tar cvfz \
|
||||||
|
just-{{VERSION}}-{{TARGET}}.tar.gz \
|
||||||
|
just-{{VERSION}}-{{TARGET}}
|
||||||
|
open tmp
|
||||||
|
|
||||||
# clean up feature branch BRANCH
|
# clean up feature branch BRANCH
|
||||||
done BRANCH:
|
done BRANCH:
|
||||||
git checkout {{BRANCH}}
|
git checkout {{BRANCH}}
|
||||||
|
Loading…
Reference in New Issue
Block a user