-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add rime header and just file and stuff
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
- Loading branch information
Showing
6 changed files
with
122 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
use flake . | ||
if has nix; then | ||
use flake . | ||
fi | ||
if has kitty; then | ||
kitty +icat docs/images/rime.jpg | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name := "rime" | ||
|
||
cropHeader: | ||
convert docs/images/Rimed_hexagonal_snow_crystal.TIF.jpg -crop 1024x325+0+380 docs/images/rime.jpg && kitty +icat docs/images/rime.jpg | ||
|
||
#---------------# | ||
# release # | ||
#---------------# | ||
|
||
new_version := "$(convco version --bump)" | ||
|
||
# If you're not cafkafk and she isn't dead, don't run this! | ||
release: | ||
cargo bump "{{new_version}}" | ||
git cliff -t "{{new_version}}" > CHANGELOG.md | ||
cargo check | ||
nix build -L ./#clippy | ||
git checkout -b "cafk-release-v{{new_version}}" | ||
git commit -asm "chore: release {{name}} v{{new_version}}" | ||
git push | ||
@echo "waiting 10 seconds for github to catch up..." | ||
sleep 10 | ||
gh pr create --draft --title "chore: release v{{new_version}}" --body "This PR was auto-generated by our lovely just file" --reviewer cafkafk | ||
@echo "Now go review that and come back and run gh-release" | ||
|
||
@gh-release: | ||
git tag -d "v{{new_version}}" || echo "tag not found, creating"; | ||
git tag -a "v{{new_version}}" -m "auto generated by the justfile for {{name}} v$(convco version)" | ||
just cross | ||
mkdir -p ./target/"release-notes-$(convco version)" | ||
git cliff -t "v$(convco version)" --current > ./target/"release-notes-$(convco version)/RELEASE.md" | ||
just checksum >> ./target/"release-notes-$(convco version)/RELEASE.md" | ||
|
||
gh release create "v$(convco version)" --target "$(git rev-parse HEAD)" --title "{{name}} v$(convco version)" -d -F ./target/"release-notes-$(convco version)/RELEASE.md" ./target/"bin-$(convco version)"/* | ||
|
||
#----------------# | ||
# binaries # | ||
#----------------# | ||
|
||
tar BINARY TARGET: | ||
tar czvf ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}.tar.gz -C ./target/{{TARGET}}/release/ ./{{BINARY}} | ||
|
||
zip BINARY TARGET: | ||
zip -j ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}.zip ./target/{{TARGET}}/release/{{BINARY}} | ||
|
||
tar_static BINARY TARGET: | ||
tar czvf ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}_static.tar.gz -C ./target/{{TARGET}}/release/ ./{{BINARY}} | ||
|
||
zip_static BINARY TARGET: | ||
zip -j ./target/"bin-$(convco version)"/{{BINARY}}_{{TARGET}}_static.zip ./target/{{TARGET}}/release/{{BINARY}} | ||
|
||
binary BINARY TARGET: | ||
rustup target add {{TARGET}} | ||
cross build --release --target {{TARGET}} | ||
just tar {{BINARY}} {{TARGET}} | ||
just zip {{BINARY}} {{TARGET}} | ||
|
||
binary_static BINARY TARGET: | ||
rustup target add {{TARGET}} | ||
RUSTFLAGS='-C target-feature=+crt-static' cross build --release --target {{TARGET}} | ||
just tar_static {{BINARY}} {{TARGET}} | ||
just zip_static {{BINARY}} {{TARGET}} | ||
|
||
checksum: | ||
@echo "# Checksums" | ||
@echo "## sha256sum" | ||
@echo '```' | ||
@sha256sum ./target/"bin-$(convco version)"/* | ||
@echo '```' | ||
@echo "## md5sum" | ||
@echo '```' | ||
@md5sum ./target/"bin-$(convco version)"/* | ||
@echo '```' | ||
|
||
alias c := cross | ||
|
||
# Generate release binaries | ||
# | ||
# usage: cross | ||
@cross: | ||
# Setup Output Directory | ||
mkdir -p ./target/"bin-$(convco version)" | ||
|
||
# Install Toolchains/Targets | ||
rustup toolchain install stable | ||
|
||
## Linux | ||
### x86 | ||
just binary {{name}} x86_64-unknown-linux-gnu | ||
# just binary_static {{name}} x86_64-unknown-linux-gnu | ||
just binary {{name}} x86_64-unknown-linux-musl | ||
just binary_static {{name}} x86_64-unknown-linux-musl | ||
|
||
### aarch | ||
just binary {{name}} aarch64-unknown-linux-gnu | ||
# BUG: just binary_static {{name}} aarch64-unknown-linux-gnu | ||
|
||
### arm | ||
just binary {{name}} arm-unknown-linux-gnueabihf | ||
# just binary_static {{name}} arm-unknown-linux-gnueabihf | ||
|
||
## MacOS | ||
# TODO: just binary {{name}} x86_64-apple-darwin | ||
|
||
## Windows | ||
### x86 | ||
just binary {{name}}.exe x86_64-pc-windows-gnu | ||
# just binary_static {{name}}.exe x86_64-pc-windows-gnu | ||
# TODO: just binary {{name}}.exe x86_64-pc-windows-gnullvm | ||
# TODO: just binary {{name}}.exe x86_64-pc-windows-msvc | ||
|
||
# Generate Checksums | ||
# TODO: moved to gh-release just checksum | ||
|