diff --git a/README.md b/README.md index 194fa3f..4dd44ce 100644 --- a/README.md +++ b/README.md @@ -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 @@ -54,6 +52,13 @@ cd - ../templates/generate.sh git add ``` +Regarding Continuous Integration, the `generate.sh` will generate: +* 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`. diff --git a/generate.sh b/generate.sh index 254f6bc..fc8a52a 100755 --- a/generate.sh +++ b/generate.sh @@ -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