Skip to content

Commit

Permalink
Remove old recipes from project justfile (#2367)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Sep 14, 2024
1 parent fe131f5 commit d4e1799
Showing 1 changed file with 2 additions and 48 deletions.
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

0 comments on commit d4e1799

Please sign in to comment.