#generate #layout #runtime #continuous-integration #build #system #helper #templates #command #tools

bin+lib sifis-generate

Generate a new project for some build systems with the use of templates

6 releases (3 breaking)

Uses new Rust 2021

0.4.0 Sep 13, 2022
0.3.1 May 11, 2022
0.2.1 Mar 31, 2022
0.1.0 Nov 19, 2021

#649 in Development tools

MIT license

33KB
763 lines

sifis-generate

This tool generates either new projects for some build systems or configuration files for some Continuous Integration with the use of templates.

Templates define the layout for a project and allow developers to insert data at runtime.

Each template contains all files necessary to build a project with a build system, in addition to Continuous Integration and Docker files used to run tests and implement further checks.

Supported build systems

  • meson
  • poetry
  • maven

Build systems CI files

  • cargo
  • yarn

Commands

To see the list of supported commands, run: sifis-generate --help

Each command has an optional argument to define a license and an optional argument to override the project name instead of using the last component of the project-path. The default value for the license argument is MIT.

cargo

$ sifis-generate cargo [--license LICENSE --project-name NAME] project-path

maven

$ sifis-generate maven [--license LICENSE --project-name NAME] project-group project-path

meson

$ sifis-generate meson [--kind meson-project-kind] [--license LICENSE --project-name NAME] project-path

Admitted values for the kind argument:

  • c
  • c++

poetry

$ sifis-generate poetry [--license LICENSE --project-name NAME] project-path

yarn

$ sifis-generate yarn [--license LICENSE --project-name NAME] project-path

Project Templates

The following templates generate build systems files in addition to the configuration files for GitHub and GitLab Continuous Integration. Some templates also produces files to configure the Docker environment.

  • meson-c
    • lib directory for library source files
    • cli directory for command line source files
    • test directory for tests source files
    • README.md
    • meson.build
    • Dockerfile
    • docker-compose.yml
    • github.yml
    • .gitlab-ci.yml
  • meson-c++
    • Same files generated by the meson-c template but configured for the cpp language
  • poetry
    • README.md
    • pyproject.toml
    • .pre-commit-config.yaml
    • github.yml
    • .gitlab-ci.yml
  • maven
    • main directory for library source files
    • test directory for tests source files
    • README.md
    • pom.xml
    • github.yml
  • cargo-ci
    • README.md
    • github-compact.yml
    • github-ubuntu.yml
    • github-macos.yml
    • github-windows.yml
    • github-deploy.yml
    • .gitlab-ci.yml
  • yarn-ci
    • README.md
    • github.yml
    • .gitlab-ci.yml

License

Released under the MIT License.

Acknowledgements

This software has been developed in the scope of the H2020 project SIFIS-Home with GA n. 952652.

Dependencies

~10MB
~144K SLoC