Skip to content

Commit

Permalink
chore: cargo update
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Mar 16, 2024
1 parent 63fc69b commit fd05359
Show file tree
Hide file tree
Showing 16 changed files with 301 additions and 163 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
indent_style = space
indent_size = 2

[*.sh]
[{*.sh,.mise/tasks/**/*}]
indent_style = space
indent_size = 2

Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: release-plz

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main
- release-plz

concurrency:
group: release-plz

jobs:
release-plz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
- uses: kenji-miyake/setup-git-cliff@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: unit
save-if: false
- run: mkdir -p $HOME/bin && echo "$HOME/bin" >> "$GITHUB_PATH"
- run: |
set -euxo pipefail
cargo build
cp target/debug/mise $HOME/bin
mise trust --all
mise settings set experimental true
- run: mise run release-plz
env:
GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
9 changes: 8 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ run = "cargo insta test --accept --unreferenced delete"

[tasks."lint:fix"]
alias = "lint-fix"
run = "just lint-fix"
run = [
"cargo clippy --fix --allow-staged --allow-dirty -- -Dwarnings",
"cargo fmt --all",
"mise x -y shellcheck@latest -- shellcheck -x scripts/*.sh e2e/{test_,run_}* e2e/*.sh",
"mise x -y shfmt@latest -- shfmt -w scripts/*.sh e2e/{test_,run_}* e2e/*.sh",
"MISE_EXPERIMENTAL=1 mise x -y npm:prettier@latest -- prettier -w $(git ls-files '*.yml' '*.yaml')",
"MISE_EXPERIMENTAL=1 mise x -y npm:markdownlint-cli@latest -- markdownlint --fix .",
]

[tasks.test]
alias = 't'
Expand Down
22 changes: 22 additions & 0 deletions .mise/tasks/release-plz
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euxo pipefail

version="$(git cliff --bumped-version)"
sed -i.bak "s/^mise [0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?$/mise $version/" README.md
sed -i.bak "s/^Version: [0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?$/Version: $version/" packaging/rpm/mise.spec
sed -i.bak "s/version = \"[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc\.[0-9]\+\)\?\";$/version = \"$version\";/" default.nix

mise run update-shorthand-repo
mise run render ::: lint:fix

git add \
README.md \
default.nix \
packaging/rpm/mise.spec \
src/default_shorthands.rs \
mise.usage.kdl \
completions \
man/

git clean -df
git cliff --bump -o CHANGELOG.md --verbose
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cat >src/default_shorthands.rs <<EOF
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !GENERATED FILE!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// This file is generated by scripts/update-shorthand-repo.sh
// This file is generated by .mise/tasks/update-shorthand-repo
// DO NOT EDIT THIS FILE MANUALLY. YOUR PR WILL BE REJECTED.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !GENERATED FILE!
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv
Loading

0 comments on commit fd05359

Please sign in to comment.