Link to GitHub release pages in changelog (#886)

This commit is contained in:
Casey Rodarmor 2021-06-26 13:41:07 -07:00 committed by GitHub
parent 7aaa20a976
commit 9ecf8ab027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 190 additions and 190 deletions

View File

@ -1,8 +1,8 @@
Changelog Changelog
========= =========
[v0.9.6] - 2021-6-24 [0.9.6](https://github.com/casey/just/releases/tag/0.9.6) - 2021-6-24
-------------------- ---------------------------------------------------------------------
### Added ### Added
- Add `clean` function for simplifying paths (#883) - Add `clean` function for simplifying paths (#883)
@ -14,8 +14,8 @@ Changelog
- Document path manipulation functions in readme (#877) - Document path manipulation functions in readme (#877)
[v0.9.5] - 2021-6-12 [0.9.5](https://github.com/casey/just/releases/tag/0.9.5) - 2021-6-12
-------------------- ---------------------------------------------------------------------
### Added ### Added
- Add `--unstable` flag (#869) - Add `--unstable` flag (#869)
@ -35,8 +35,8 @@ Changelog
- Move pages assets to `www` (#845) - Move pages assets to `www` (#845)
[v0.9.4] - 2021-5-27 [0.9.4](https://github.com/casey/just/releases/tag/v0.9.4) - 2021-5-27
-------------------- ----------------------------------------------------------------------
### Misc ### Misc
- Release `aarch64-unknown-linux-gnu` binaries (#843) - Release `aarch64-unknown-linux-gnu` binaries (#843)
@ -47,8 +47,8 @@ Changelog
- Refactor shebang handling (#833) - Refactor shebang handling (#833)
[v0.9.3] - 2021-5-16 [0.9.3](https://github.com/casey/just/releases/tag/v0.9.3) - 2021-5-16
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Add shebang support for 'cmd.exe' (#828) - Add shebang support for 'cmd.exe' (#828)
@ -67,15 +67,15 @@ Changelog
- Fix changelog years (#813) - Fix changelog years (#813)
[v0.9.2] - 2021-5-02 [0.9.2](https://github.com/casey/just/releases/tag/v0.9.2) - 2021-5-02
-------------------- ----------------------------------------------------------------------
### Fixed ### Fixed
- Pass evaluated arguments as positional arguments (#810) - Pass evaluated arguments as positional arguments (#810)
[v0.9.1] - 2021-4-24 [0.9.1](https://github.com/casey/just/releases/tag/v0.9.1) - 2021-4-24
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Change `--eval` to print variable value only (#806) - Change `--eval` to print variable value only (#806)
@ -94,15 +94,15 @@ Changelog
- Warn if `.env` file loaded and `dotenv-load` unset (#784) - Warn if `.env` file loaded and `dotenv-load` unset (#784)
[v0.9.0] - 2021-3-28 [0.9.0](https://github.com/casey/just/releases/tag/v0.9.0) - 2021-3-28
-------------------- ----------------------------------------------------------------------
### Changed ### Changed
- Turn `=` deprecation warning into a hard error (#780) - Turn `=` deprecation warning into a hard error (#780)
[v0.8.7] - 2021-3-28 [0.8.7](https://github.com/casey/just/releases/tag/v0.8.7) - 2021-3-28
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Add `dotenv-load` setting (#778) - Add `dotenv-load` setting (#778)
@ -111,8 +111,8 @@ Changelog
- Change publish recipe to use stable rust (#777) - Change publish recipe to use stable rust (#777)
[v0.8.6] - 2021-3-28 [0.8.6](https://github.com/casey/just/releases/tag/v0.8.6) - 2021-3-28
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Add just_executable() function (#775) - Add just_executable() function (#775)
@ -128,8 +128,8 @@ Changelog
- Fix warnings (#770) - Fix warnings (#770)
[v0.8.5] - 2021-3-24 [0.8.5](https://github.com/casey/just/releases/tag/v0.8.5) - 2021-3-24
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Allow escaping double braces with `{{{{` (#765) - Allow escaping double braces with `{{{{` (#765)
@ -142,8 +142,8 @@ Changelog
- Note shebang line splitting inconsistency in readme (#757) - Note shebang line splitting inconsistency in readme (#757)
[v0.8.4] - 2021-2-9 [0.8.4](https://github.com/casey/just/releases/tag/v0.8.4) - 2021-2-9
------------------- ---------------------------------------------------------------------
### Added ### Added
- Add options to control list formatting (#753) - Add options to control list formatting (#753)
@ -161,15 +161,15 @@ Changelog
- Update man page to v0.8.3 (#720) - Update man page to v0.8.3 (#720)
[v0.8.3] - 2020-10-27 [0.8.3](https://github.com/casey/just/releases/tag/v0.8.3) - 2020-10-27
--------------------- -----------------------------------------------------------------------
### Added ### Added
- Allow ignoring line endings inside delimiters (#717) - Allow ignoring line endings inside delimiters (#717)
[v0.8.2] - 2020-10-26 [0.8.2](https://github.com/casey/just/releases/tag/v0.8.2) - 2020-10-26
--------------------- -----------------------------------------------------------------------
### Added ### Added
- Add conditional expressions (#714) - Add conditional expressions (#714)
@ -183,8 +183,8 @@ Changelog
- Document feature flags in Cargo.toml (#709) - Document feature flags in Cargo.toml (#709)
[v0.8.1] - 2020-10-15 [0.8.1](https://github.com/casey/just/releases/tag/v0.8.1) - 2020-10-15
--------------------- -----------------------------------------------------------------------
### Changed ### Changed
- Allow choosing multiple recipes to run (#700) - Allow choosing multiple recipes to run (#700)
@ -198,8 +198,8 @@ Changelog
- Fix readme documentation for ignoring errors (#692) - Fix readme documentation for ignoring errors (#692)
[v0.8.0] - 2020-10-3 [0.8.0](https://github.com/casey/just/releases/tag/v0.8.0) - 2020-10-3
-------------------- ----------------------------------------------------------------------
### Breaking ### Breaking
- Allow suppressing failures with `-` prefix (#687) - Allow suppressing failures with `-` prefix (#687)
@ -210,8 +210,8 @@ Changelog
- Move separate quiet config value to verbosity (#686) - Move separate quiet config value to verbosity (#686)
[v0.7.3] - 2020-9-17 [0.7.3](https://github.com/casey/just/releases/tag/v0.7.3) - 2020-9-17
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Add the `--choose` subcommand (#680) - Add the `--choose` subcommand (#680)
@ -221,8 +221,8 @@ Changelog
- Document `--unsorted` flag in readme (#672) - Document `--unsorted` flag in readme (#672)
[v0.7.2] - 2020-8-23 [0.7.2](https://github.com/casey/just/releases/tag/v0.7.2) - 2020-8-23
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Add option to print recipes in source order (#669) - Add option to print recipes in source order (#669)
@ -232,8 +232,8 @@ Changelog
- Add list highlighting nice features to readme (#664) - Add list highlighting nice features to readme (#664)
[v0.7.1] - 2020-7-19 [0.7.1](https://github.com/casey/just/releases/tag/v0.7.1) - 2020-7-19
-------------------- ----------------------------------------------------------------------
### Fixed ### Fixed
- Search for `.env` file from working directory (#661) - Search for `.env` file from working directory (#661)
@ -242,8 +242,8 @@ Changelog
- Move link-time optimization config into `Cargo.toml` (#658) - Move link-time optimization config into `Cargo.toml` (#658)
[v0.7.0] - 2020-7-16 [0.7.0](https://github.com/casey/just/releases/tag/v0.7.0) - 2020-7-16
-------------------- ----------------------------------------------------------------------
### Breaking ### Breaking
- Skip `.env` items which are set in environment (#656) - Skip `.env` items which are set in environment (#656)
@ -252,15 +252,15 @@ Changelog
- Mark tags that start with `v` as releases (#654) - Mark tags that start with `v` as releases (#654)
[v0.6.1] - 2020-6-28 [0.6.1](https://github.com/casey/just/releases/tag/v0.6.1) - 2020-6-28
-------------------- ----------------------------------------------------------------------
### Changed ### Changed
- Only use `cygpath` on shebang if it contains `/` (#652) - Only use `cygpath` on shebang if it contains `/` (#652)
[v0.6.0] - 2020-6-18 [0.6.0](https://github.com/casey/just/releases/tag/v0.6.0) - 2020-6-18
-------------------- ----------------------------------------------------------------------
### Changed ### Changed
- Ignore '@' returned from interpolation evaluation (#636) - Ignore '@' returned from interpolation evaluation (#636)
@ -279,8 +279,8 @@ Changelog
- Document how to run recipes after another recipe (#630) - Document how to run recipes after another recipe (#630)
[v0.5.11] - 2020-5-23 [0.5.11](https://github.com/casey/just/releases/tag/v0.5.11) - 2020-5-23
--------------------- ------------------------------------------------------------------------
### Added ### Added
- Don't load `.env` file when `--no-dotenv` is passed (#627) - Don't load `.env` file when `--no-dotenv` is passed (#627)
@ -290,12 +290,12 @@ Changelog
- Suggest aliases for unknown recipes (#624) - Suggest aliases for unknown recipes (#624)
[v0.5.10] - 2020-3-18 [0.5.10](https://github.com/casey/just/releases/tag/v0.5.10) - 2020-3-18
--------------------- ------------------------------------------------------------------------
[v0.5.9] - 2020-3-18 [0.5.9](https://github.com/casey/just/releases/tag/v0.5.9) - 2020-3-18
-------------------- ----------------------------------------------------------------------
### Added ### Added
- Update zsh completion file (#606) - Update zsh completion file (#606)
@ -318,8 +318,8 @@ Changelog
- Use unstable rustfmt configuration options (#592) - Use unstable rustfmt configuration options (#592)
[v0.5.8] - 2020-1-28 [0.5.8](https://github.com/casey/just/releases/tag/v0.5.8) - 2020-1-28
-------------------- ----------------------------------------------------------------------
## Changed ## Changed
- Only use `cygpath` on windows if present (#586) - Only use `cygpath` on windows if present (#586)
@ -329,15 +329,15 @@ Changelog
- Remove unused dependencies (#587) - Remove unused dependencies (#587)
[v0.5.7] - 2020-1-28 [0.5.7](https://github.com/casey/just/releases/tag/v0.5.7) - 2020-1-28
-------------------- ----------------------------------------------------------------------
## Misc ## Misc
- Don't include directories in release archive (#583) - Don't include directories in release archive (#583)
[v0.5.6] - 2020-1-28 [0.5.6](https://github.com/casey/just/releases/tag/v0.5.6) - 2020-1-28
-------------------- ----------------------------------------------------------------------
## Misc ## Misc
- Build and upload release artifacts from GitHub Actions (#581) - Build and upload release artifacts from GitHub Actions (#581)
@ -346,8 +346,8 @@ Changelog
- Fix readme typo: interpetation -> interpretation (#578) - Fix readme typo: interpetation -> interpretation (#578)
[v0.5.5] - 2020-1-15 [0.5.5](https://github.com/casey/just/releases/tag/v0.5.5) - 2020-1-15
-------------------- ----------------------------------------------------------------------
## Added ## Added
- Generate shell completion scripts with `--completions` (#572) - Generate shell completion scripts with `--completions` (#572)
@ -357,8 +357,8 @@ Changelog
- Add additional continuous integration checks (#574) - Add additional continuous integration checks (#574)
[v0.5.4] - 2019-12-25 [0.5.4](https://github.com/casey/just/releases/tag/v0.5.4) - 2019-12-25
--------------------- -----------------------------------------------------------------------
# Added # Added
- Add `justfile_directory()` and `justfile()` (#569) - Add `justfile_directory()` and `justfile()` (#569)
@ -371,8 +371,8 @@ Changelog
- Update Cargo.lock with new version (#564) - Update Cargo.lock with new version (#564)
[v0.5.3] - 2019-12-11 [0.5.3](https://github.com/casey/just/releases/tag/v0.5.3) - 2019-12-11
--------------------- -----------------------------------------------------------------------
## Misc ## Misc
- Assert that lexer advances over entire input (#560) - Assert that lexer advances over entire input (#560)
@ -380,8 +380,8 @@ Changelog
- Improve pre-publish check (#562) - Improve pre-publish check (#562)
[v0.5.2] - 2019-12-7 [0.5.2](https://github.com/casey/just/releases/tag/v0.5.2) - 2019-12-7
-------------------- ----------------------------------------------------------------------
## Added ## Added
- Add flags to set and clear shell arguments (#551) - Add flags to set and clear shell arguments (#551)
@ -396,8 +396,8 @@ Changelog
- Reform scope and binding (#556) - Reform scope and binding (#556)
[v0.5.1] - 2019-11-20 [0.5.1](https://github.com/casey/just/releases/tag/v0.5.1) - 2019-11-20
--------------------- -----------------------------------------------------------------------
## Added ## Added
- Add `--init` subcommand (#541) - Add `--init` subcommand (#541)
@ -412,8 +412,8 @@ Changelog
- Add missing `--init` test (#543) - Add missing `--init` test (#543)
[v0.5.0] - 2019-11-12 [0.5.0](https://github.com/casey/just/releases/tag/v0.5.0) - 2019-11-12
--------------------- -----------------------------------------------------------------------
## Added ## Added
@ -435,8 +435,8 @@ Changelog
- Note need to publish with nightly cargo (#506) - Note need to publish with nightly cargo (#506)
[v0.4.5] - 2019-10-31 [0.4.5](https://github.com/casey/just/releases/tag/v0.4.5) - 2019-10-31
--------------------- -----------------------------------------------------------------------
## User-visible ## User-visible
@ -486,8 +486,8 @@ Changelog
- Update dependencies (#501) - Update dependencies (#501)
[v0.4.4] - 2019-06-02 [0.4.4](https://github.com/casey/just/releases/tag/v0.4.4) - 2019-06-02
--------------------- -----------------------------------------------------------------------
### Changed ### Changed
- Ignore file name case while searching for justfile (#436) - Ignore file name case while searching for justfile (#436)
@ -496,8 +496,8 @@ Changelog
- Display alias target with `--show` (#443) - Display alias target with `--show` (#443)
[v0.4.3] - 2019-05-07 [0.4.3](https://github.com/casey/just/releases/tag/v0.4.3) - 2019-05-07
--------------------- -----------------------------------------------------------------------
### Changed ### Changed
- Deprecate `=` in assignments, aliases, and exports in favor of `:=` (#413) - Deprecate `=` in assignments, aliases, and exports in favor of `:=` (#413)
@ -520,22 +520,22 @@ Changelog
- Remove `write_token_error_context` (#417) - Remove `write_token_error_context` (#417)
[v0.4.2] - 2019-04-12 [0.4.2](https://github.com/casey/just/releases/tag/v0.4.2) - 2019-04-12
--------------------- -----------------------------------------------------------------------
### Changed ### Changed
- Regex-based lexer replaced with much nicer character-at-a-time lexer (#406) - Regex-based lexer replaced with much nicer character-at-a-time lexer (#406)
[v0.4.1] - 2019-04-12 [0.4.1](https://github.com/casey/just/releases/tag/v0.4.1) - 2019-04-12
--------------------- -----------------------------------------------------------------------
### Changed ### Changed
- Make summary function non-generic (#404) - Make summary function non-generic (#404)
[v0.4.0] - 2019-04-12 [0.4.0](https://github.com/casey/just/releases/tag/v0.4.0) - 2019-04-12
--------------------- -----------------------------------------------------------------------
### Added ### Added
- Add recipe aliases by @ryloric (#390) - Add recipe aliases by @ryloric (#390)
@ -550,8 +550,8 @@ Changelog
- Format the codebase with rustfmt (#346) - Format the codebase with rustfmt (#346)
[v0.3.13] - 2018-11-06 [0.3.13](https://github.com/casey/just/releases/tag/v0.3.13) - 2018-11-06
---------------------- -------------------------------------------------------------------------
### Added ### Added
- Print recipe signature if missing arguments (#369) - Print recipe signature if missing arguments (#369)
@ -563,50 +563,50 @@ Changelog
- Use PutBackN instead of PutBack in parser (#364) - Use PutBackN instead of PutBack in parser (#364)
[v0.3.12] - 2018-06-19 [0.3.12](https://github.com/casey/just/releases/tag/v0.3.12) - 2018-06-19
---------------------- -------------------------------------------------------------------------
### Added ### Added
- Implemented invocation_directory function - Implemented invocation_directory function
[v0.3.11] - 2018-05-6 [0.3.11](https://github.com/casey/just/releases/tag/v0.3.11) - 2018-05-6
--------------------- ------------------------------------------------------------------------
### Fixed ### Fixed
- Fixed colors on windows (#317) - Fixed colors on windows (#317)
[v0.3.10] - 2018-3-19 [0.3.10](https://github.com/casey/just/releases/tag/v0.3.10) - 2018-3-19
--------------------- ------------------------------------------------------------------------
### Added ### Added
- Make .env vars available in env_var functions (#310) - Make .env vars available in env_var functions (#310)
[v0.3.8] - 2018-3-5 [0.3.8](https://github.com/casey/just/releases/tag/v0.3.8) - 2018-3-5
------------------- ---------------------------------------------------------------------
## Added ## Added
- Add dotenv integration (#306) - Add dotenv integration (#306)
[v0.3.7] - 2017-12-11 [0.3.7](https://github.com/casey/just/releases/tag/v0.3.7) - 2017-12-11
--------------------- -----------------------------------------------------------------------
### Fixed ### Fixed
- Fix error if ! appears in comment (#296) - Fix error if ! appears in comment (#296)
[v0.3.6] - 2017-12-11 [0.3.6](https://github.com/casey/just/releases/tag/v0.3.6) - 2017-12-11
--------------------- -----------------------------------------------------------------------
### Fixed ### Fixed
- Lex CRLF line endings properly (#292) - Lex CRLF line endings properly (#292)
[v0.3.5] - 2017-12-11 [0.3.5](https://github.com/casey/just/releases/tag/v0.3.5) - 2017-12-11
--------------------- -----------------------------------------------------------------------
### Added ### Added
- Align doc-comments in `--list` output (#273) - Align doc-comments in `--list` output (#273)
@ -614,8 +614,8 @@ Changelog
- Add `env_var(key)` and `env_var_or_default(key, default)` functions (#280) - Add `env_var(key)` and `env_var_or_default(key, default)` functions (#280)
[v0.3.4] - 2017-10-06 [0.3.4](https://github.com/casey/just/releases/tag/v0.3.4) - 2017-10-06
--------------------- -----------------------------------------------------------------------
### Added ### Added
- Do not evaluate backticks in assignments during dry runs (#253) - Do not evaluate backticks in assignments during dry runs (#253)
@ -624,8 +624,8 @@ Changelog
- Change license to CC0 going forward (#270) - Change license to CC0 going forward (#270)
[v0.3.1] - 2017-10-06 [0.3.1](https://github.com/casey/just/releases/tag/v0.3.1) - 2017-10-06
--------------------- -----------------------------------------------------------------------
### Added ### Added
- Started keeping a changelog in CHANGELOG.md (#220) - Started keeping a changelog in CHANGELOG.md (#220)

184
justfile
View File

@ -15,187 +15,187 @@ log := "warn"
export JUST_LOG := log export JUST_LOG := log
test: test:
cargo test cargo test
fuzz: fuzz:
cargo +nightly fuzz run fuzz-compiler cargo +nightly fuzz run fuzz-compiler
run: run:
cargo run cargo run
@spam: @spam:
{ \ { \
figlet test; \ figlet test; \
cargo build --color always 2>&1; \ cargo build --color always 2>&1; \
cargo test --color always -- --color always 2>&1; \ cargo test --color always -- --color always 2>&1; \
} | less } | less
# only run tests matching PATTERN # only run tests matching PATTERN
filter PATTERN: filter PATTERN:
cargo test {{PATTERN}} cargo test {{PATTERN}}
build: build:
cargo build cargo build
fmt: fmt:
cargo +nightly fmt --all cargo +nightly fmt --all
watch +COMMAND='test': watch +COMMAND='test':
cargo watch --clear --exec "{{COMMAND}}" cargo watch --clear --exec "{{COMMAND}}"
man: man:
cargo build --features help4help2man cargo build --features help4help2man
help2man \ help2man \
--name 'save and run commands' \ --name 'save and run commands' \
--manual 'Just Manual' \ --manual 'Just Manual' \
--no-info \ --no-info \
target/debug/just \ target/debug/just \
> man/just.1 > man/just.1
view-man: man view-man: man
man man/just.1 man man/just.1
version := `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1` version := `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
# add git log messages to changelog # add git log messages to changelog
changes: changes:
git log --pretty=format:%s >> CHANGELOG.md git log --pretty=format:%s >> CHANGELOG.md
check: clippy test forbid check: clippy test forbid
git diff --no-ext-diff --quiet --exit-code git diff --no-ext-diff --quiet --exit-code
grep {{version}} CHANGELOG.md grep '^\[{{ version }}\]' CHANGELOG.md
cargo +nightly generate-lockfile -Z minimal-versions cargo +nightly generate-lockfile -Z minimal-versions
cargo test cargo test
git checkout Cargo.lock git checkout Cargo.lock
publish-check: check man publish-check: check man
cargo outdated --exit-code 1 cargo outdated --exit-code 1
# publish to crates.io and push release tag to github # publish to crates.io and push release tag to github
publish: publish-check publish: publish-check
git branch | grep '* master' git branch | grep '* master'
git tag -a {{version}} -m 'Release {{version}}' git tag -a {{version}} -m 'Release {{version}}'
git push github {{version}} git push github {{version}}
cargo publish cargo publish
push: check push: check
! git branch | grep '* master' ! git branch | grep '* master'
git push github git push github
pr: push pr: push
gh pr create --web gh pr create --web
# clean up feature branch BRANCH # clean up feature branch BRANCH
done BRANCH=`git rev-parse --abbrev-ref HEAD`: done BRANCH=`git rev-parse --abbrev-ref HEAD`:
git checkout master git checkout master
git diff --no-ext-diff --quiet --exit-code git diff --no-ext-diff --quiet --exit-code
git pull --rebase github master git pull --rebase github master
git diff --no-ext-diff --quiet --exit-code {{BRANCH}} git diff --no-ext-diff --quiet --exit-code {{BRANCH}}
git branch -D {{BRANCH}} git branch -D {{BRANCH}}
# install just from crates.io # install just from crates.io
install: install:
cargo install -f just cargo install -f just
# install development dependencies # install development dependencies
install-dev-deps: install-dev-deps:
rustup install nightly rustup install nightly
rustup update nightly rustup update nightly
rustup run nightly cargo install -f clippy rustup run nightly cargo install -f clippy
cargo install -f cargo-watch cargo install -f cargo-watch
cargo install -f cargo-check cargo install -f cargo-check
cargo +nightly install cargo-fuzz cargo +nightly install cargo-fuzz
# install system development dependencies with homebrew # install system development dependencies with homebrew
install-dev-deps-homebrew: install-dev-deps-homebrew:
brew install help2man brew install help2man
# everyone's favorite animate paper clip # everyone's favorite animate paper clip
clippy: clippy:
cargo clippy --all --all-targets --all-features cargo clippy --all --all-targets --all-features
forbid: forbid:
./bin/forbid ./bin/forbid
# count non-empty lines of code # count non-empty lines of code
sloc: sloc:
@cat src/*.rs | sed '/^\s*$/d' | wc -l @cat src/*.rs | sed '/^\s*$/d' | wc -l
replace FROM TO: replace FROM TO:
sd '{{FROM}}' '{{TO}}' src/*.rs sd '{{FROM}}' '{{TO}}' src/*.rs
test-quine: test-quine:
cargo run -- quine cargo run -- quine
# make a quine, compile it, and verify it # make a quine, compile it, and verify it
quine: quine:
mkdir -p tmp mkdir -p tmp
@echo '{{quine-text}}' > tmp/gen0.c @echo '{{quine-text}}' > tmp/gen0.c
cc tmp/gen0.c -o tmp/gen0 cc tmp/gen0.c -o tmp/gen0
./tmp/gen0 > tmp/gen1.c ./tmp/gen0 > tmp/gen1.c
cc tmp/gen1.c -o tmp/gen1 cc tmp/gen1.c -o tmp/gen1
./tmp/gen1 > tmp/gen2.c ./tmp/gen1 > tmp/gen2.c
diff tmp/gen1.c tmp/gen2.c diff tmp/gen1.c tmp/gen2.c
rm -r tmp rm -r tmp
@echo 'It was a quine!' @echo 'It was a quine!'
quine-text := ' quine-text := '
int printf(const char*, ...); int printf(const char*, ...);
int main() { int main() {
char *s = char *s =
"int printf(const char*, ...);" "int printf(const char*, ...);"
"int main() {" "int main() {"
" char *s = %c%s%c;" " char *s = %c%s%c;"
" printf(s, 34, s, 34);" " printf(s, 34, s, 34);"
" return 0;" " return 0;"
"}"; "}";
printf(s, 34, s, 34); printf(s, 34, s, 34);
return 0; return 0;
} }
' '
render-readme: render-readme:
#!/usr/bin/env ruby #!/usr/bin/env ruby
require 'github/markup' require 'github/markup'
$rendered = GitHub::Markup.render("README.adoc", File.read("README.adoc")) $rendered = GitHub::Markup.render("README.adoc", File.read("README.adoc"))
File.write('tmp/README.html', $rendered) File.write('tmp/README.html', $rendered)
watch-readme: watch-readme:
just render-readme just render-readme
fswatch -ro README.adoc | xargs -n1 -I{} just render-readme fswatch -ro README.adoc | xargs -n1 -I{} just render-readme
generate-completions: generate-completions:
./bin/generate-completions ./bin/generate-completions
# run all polyglot recipes # run all polyglot recipes
polyglot: _python _js _perl _sh _ruby polyglot: _python _js _perl _sh _ruby
# (recipes that start with `_` are hidden from --list) # (recipes that start with `_` are hidden from --list)
_python: _python:
#!/usr/bin/env python3 #!/usr/bin/env python3
print('Hello from python!') print('Hello from python!')
_js: _js:
#!/usr/bin/env node #!/usr/bin/env node
console.log('Greetings from JavaScript!') console.log('Greetings from JavaScript!')
_perl: _perl:
#!/usr/bin/env perl #!/usr/bin/env perl
print "Larry Wall says Hi!\n"; print "Larry Wall says Hi!\n";
_sh: _sh:
#!/usr/bin/env sh #!/usr/bin/env sh
hello='Yo' hello='Yo'
echo "$hello from a shell script!" echo "$hello from a shell script!"
_ruby: _ruby:
#!/usr/bin/env ruby #!/usr/bin/env ruby
puts "Hello from ruby!" puts "Hello from ruby!"
# Print working directory, for demonstration purposes! # Print working directory, for demonstration purposes!
pwd: pwd:
echo {{invocation_directory()}} echo {{invocation_directory()}}
# Local Variables: # Local Variables:
# mode: makefile # mode: makefile