Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old recipes from project justfile #2367

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 2 additions & 48 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

alias t := test

alias c := check

log := "warn"

export JUST_LOG := log
Expand All @@ -14,14 +12,9 @@ watch +args='test':
cargo watch --clear --exec '{{ args }}'

test:
cargo test

ci: lint build-book
cargo test --all

lint:
cargo clippy --all --all-targets -- --deny warnings
./bin/forbid
ci: forbid test build-book clippy
cargo fmt --all -- --check
cargo update --locked --package just

Expand Down Expand Up @@ -59,13 +52,6 @@ update-changelog:
update-contributors:
cargo run --release --package update-contributors

check: fmt clippy test forbid
#!/usr/bin/env bash
set -euxo pipefail
git diff --no-ext-diff --quiet --exit-code
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
grep "^\[$VERSION\]" CHANGELOG.md

outdated:
cargo outdated -R

Expand All @@ -87,13 +73,6 @@ publish:
readme-version-notes:
grep '<sup>master</sup>' README.md

push: check
! git branch | grep '* master'
git push github

pr: push
gh pr create --web

# clean up feature branch BRANCH
done BRANCH=`git rev-parse --abbrev-ref HEAD`:
git checkout master
Expand All @@ -117,15 +96,11 @@ install-dev-deps:

# everyone's favorite animate paper clip
clippy:
cargo clippy --all --all-targets --all-features
cargo clippy --all --all-targets --all-features -- --deny warnings

forbid:
./bin/forbid

# count non-empty lines of code
sloc:
@cat src/*.rs | sed '/^\s*$/d' | wc -l

replace FROM TO:
sd '{{FROM}}' '{{TO}}' src/*.rs

Expand Down Expand Up @@ -160,16 +135,6 @@ quine-text := '
}
'

render-readme:
#!/usr/bin/env ruby
require 'github/markup'
$rendered = GitHub::Markup.render("README.adoc", File.read("README.adoc"))
File.write('tmp/README.html', $rendered)

watch-readme:
just render-readme
fswatch -ro README.adoc | xargs -n1 -I{} just render-readme

test-completions:
./tests/completions/just.bash

Expand All @@ -178,17 +143,6 @@ build-book:
mdbook build book/en
mdbook build book/zh

convert-integration-test test:
cargo expand --test integration {{test}} | \
sed \
-E \
-e 's/#\[cfg\(test\)\]/#\[test\]/' \
-e 's/^ *let test = //' \
-e 's/^ *test[.]/./' \
-e 's/;$//' \
-e 's/crate::test::Test/Test/' \
-e 's/\.run\(\)/.run();/'

# run all polyglot recipes
polyglot: _python _js _perl _sh _ruby

Expand Down