1
1
mirror of https://github.com/casey/just.git synced 2024-11-23 11:04:09 +03:00

Add recipes to build binaries for release (#131)

This commit is contained in:
Casey Rodarmor 2016-11-23 19:40:06 -08:00 committed by GitHub
parent 0195a15e68
commit da8108f19d

View File

@ -24,7 +24,7 @@ version = `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/v\1/p' Cargo.tom
publish: lint clippy test
git branch | grep '* master'
git diff --no-ext-diff --quiet --exit-code
git co -b {{version}}
git checkout -b {{version}}
git push github
cargo publish
git tag -a {{version}} -m {{version}}
@ -32,6 +32,30 @@ publish: lint clippy test
git push origin --tags
@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
done BRANCH:
git checkout {{BRANCH}}