diff --git a/.github/workflows/scaffold.yml b/.github/workflows/scaffold.yml new file mode 100644 index 0000000..a8a4d94 --- /dev/null +++ b/.github/workflows/scaffold.yml @@ -0,0 +1,38 @@ +name: Generate +on: + pull_request: + branches: [ main ] +jobs: + generate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: '3.9' + - uses: actions/cache@v4 + id: pip-cache + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip- + restore-keys: | + ${{ runner.os }}-pip- + - name: Install cookiecutter + run: | + pip install cookiecutter +# - name: Test cookiecutter +# run: | +# cookiecutter . --no-input +# - name: Set up JDK 21 +# uses: actions/setup-java@v1 +# with: +# java-version: 21 +# - name: Cache Maven packages +# uses: actions/cache@v2 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} +# restore-keys: ${{ runner.os }}-m2 +# - name: Build with Maven +# run: cd sample && mvn clean install -ntp \ No newline at end of file diff --git a/.gitignore b/.gitignore index b38118a..7f653c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # IntelliJ project files .idea *.iml -out -gen + +# The default sample project +sample diff --git a/cookiecutter.json b/cookiecutter.json new file mode 100644 index 0000000..c53e399 --- /dev/null +++ b/cookiecutter.json @@ -0,0 +1,5 @@ +{ + "app_name": "sample", + "app_name_lower": "{{cookiecutter.app_name.lower()}}", + "app_title": "{{cookiecutter.app_name.capitalize()}}" +} diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 810601b..0000000 --- a/docs/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Overview - -This project was generated by referring template repository at https://github.com/devs-from-matrix/basic-template-repository. - -## Contribution guidelines - -We are really glad you're reading this, because we need volunteer developers to help this project come to fruition. - -When contributing to this repository, please first discuss the change you wish to make via issue, -email, slack or any other method with the owners of this repository before making a change. - -Please note we have a code of conduct, please follow it in all your interactions with the project. - -## Pull request process - -- Ensure you have performed a self-review of your changes -- Ensure the new changes generate no new warnings -- Ensure you have added tests that prove the fix is effective or that the feature works -- Ensure new and existing unit tests pass locally with my changes -- Ensure your commit message should follow [conventional commit message guidelines](https://www.conventionalcommits.org/en/v1.0.0/) - -## Code of Conduct - -### Our pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of experience, -nationality, personal appearance, race, religion, or sexual identity and -orientation. - -### Our standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or -advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -### Our responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -### Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -### Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at `[INSERT EMAIL ADDRESS]`. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. diff --git a/docs/_coverpage.md b/docs/_coverpage.md deleted file mode 100644 index c0208d2..0000000 --- a/docs/_coverpage.md +++ /dev/null @@ -1,6 +0,0 @@ -# Template repository - -> A magical template generator. - -[GitHub](https://github.com/devs-from-matrix/basic-template-repository) -[Get Started](README#overview) diff --git a/docs/_sidebar.md b/docs/_sidebar.md deleted file mode 100644 index fc2585c..0000000 --- a/docs/_sidebar.md +++ /dev/null @@ -1,3 +0,0 @@ -- [Overview](README.md) - - - [Contribution guidelines](README#contribution-guidelines) diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 482deee..0000000 --- a/docs/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Document - - - - - - -
- - - - - - - - - - diff --git a/{{cookiecutter.app_name_lower}}/README.md b/{{cookiecutter.app_name_lower}}/README.md new file mode 100644 index 0000000..bbaaa6e --- /dev/null +++ b/{{cookiecutter.app_name_lower}}/README.md @@ -0,0 +1,51 @@ +# {{cookiecutter.app_title}} + +## Pre-requisite + +- maven >= 3.8.6 +- open jdk 21 + +## How to build ? + +``` +mvn clean install +``` + +### How to build a docker image ? + +``` +cd bootstrap && mvn compile jib:dockerBuild +``` + +[More information](https://cloud.google.com/java/getting-started/jib) + +## How to start ? + +``` +cd bootstrap && mvn spring-boot:run +``` + +## Formatting + +This project uses [git-code-format-maven-plugin](https://github.com/Cosium/git-code-format-maven-plugin) for formatting +the code per [google style guide](https://google.github.io/styleguide/javaguide.html) + +### How to format ? + +`mvn git-code-format:format-code` + +## Validating + +This project uses [githook-maven-plugin](https://mvnrepository.com/artifact/io.github.phillipuniverse/githook-maven-plugin) which is a maven plugin to configure and install local git hooks by running set of commands during build. + +### Command to validate formatted code + +``` +mvn git-code-format:validate-code-format +``` + +## Contribution guidelines + +We are really glad you're reading this, because we need volunteer developers to help this project come to fruition. + +Request you to please read our [contribution guidelines](https://devs-from-matrix.github.io/basic-template-repository/#/README?id=contribution-guidelines)