Skip to content

Commit

Permalink
docs: Address review comments by @Zimmi48
Browse files Browse the repository at this point in the history
  • Loading branch information
bob authored and erikmd committed May 1, 2020
1 parent 8c54163 commit 7bd2371
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ configuration and boilerplate files in the
[AAC Tactics](https://github.com/coq-community/aac-tactics)
project are generated as follows:
```shell
mustache meta.yml ../templates/default.nix.mustache > default.nix
mustache meta.yml ../templates/README.md.mustache > README.md
mustache meta.yml ../templates/.travis.yml.mustache > .travis.yml
mustache meta.yml ../templates/coq.opam.mustache > coq-aac-tactics.opam
mkdir -p .github/workflows
mustache meta.yml ../templates/coq-action.yml.mustache > .github/workflows/coq-action.yml
mustache meta.yml ../templates/default.nix.mustache > default.nix
mustache meta.yml ../templates/.travis.yml.mustache > .travis.yml
```
Other projects using the templates in a similar way include
[Chapar](https://github.com/coq-community/chapar) and
Expand All @@ -54,6 +52,14 @@ cd -
../templates/generate.sh
git add <the_generated_files>
```
Regarding continuous integration, the `generate.sh` script will create:
* a [Travis CI](https://docs.travis-ci.com/) configuration
[(based on opam + Nix)](./.travis.yml.mustache),
* or a [GitHub Action](https://help.github.com/en/actions) workflow
[(based on opam)](./coq-action.yml.mustache),

whether `meta.yml` contains `travis: true` or `action: true`.

Keeping generated files under version control is not ideal, but `README.md` has to exist,
and generally this is a common practice when using build systems such as Autotools.
To get a `mustache` tool in, e.g., NixOS, you can run `nix-env -i mustache-go`.
Expand Down
3 changes: 0 additions & 3 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

srcdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )

# ask1() { local yn; echo -n "$* [Y/n] "; read -r -n 1 yn; [[ "$yn" =~ [Yy] ]] && echo && return 0; [ -z "$yn" ] && return 0; echo; return 1; }
# if ask1 "Question?"; then ...; else ...; fi

get_yaml() {
# Arg 1: the meta.yml path
# STDIN: the mustache code
Expand Down

0 comments on commit 7bd2371

Please sign in to comment.