generated from hadenlabs/base-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(usage): implement usage tasks (#2)
- Loading branch information
Showing
2 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,146 @@ | ||
# How to use this project | ||
# 🚀 How to use this project | ||
|
||
## Add the Remote Taskfiles | ||
|
||
To use the Taskfile templates in your project, include the remote Taskfiles in your project's `Taskfile.yaml`: | ||
|
||
```yaml | ||
version: "3" | ||
includes: | ||
pre-commit: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/pre-commit/Taskfile.yaml" | ||
github: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/github/Taskfile.yaml" | ||
changelog: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/changelog/Taskfile.yaml" | ||
confluence: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/confluence/Taskfile.yaml" | ||
python: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/python/Taskfile.yaml" | ||
git: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/git/Taskfile.yaml" | ||
docs: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/docs/Taskfile.yaml" | ||
docker: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/docker/Taskfile.yaml" | ||
version: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/version/Taskfile.yaml" | ||
plantuml: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/plantuml/Taskfile.yaml" | ||
prettier: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/prettier/Taskfile.yaml" | ||
sonar: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/sonar/Taskfile.yaml" | ||
diagrams: | ||
taskfile: "https://raw.githubusercontent.com/hadenlabs/tasks/main/diagrams/Taskfile.yaml" | ||
|
||
env: | ||
DOCKER: | ||
sh: docker --version 2> /dev/null || echo "not exist" | ||
PYTHON: | ||
sh: python --version 2> /dev/null || echo "not exist" | ||
GO: | ||
sh: go version 2> /dev/null || echo "not exist" | ||
NODE: | ||
sh: node --version 2> /dev/null || echo "not exist" | ||
APP_TAG: | ||
sh: git describe --tags $(git rev-list --tags --max-count=1) 2> /dev/null || echo "0.0.0" | ||
README_YAML: provision/generators/README.yaml | ||
README_TEMPLATE: provision/templates/README.tpl.md | ||
README_INCLUDES: file:// | ||
|
||
vars: | ||
PROJECT_NAME: { { project } } | ||
GROUP_NAME: hadenlabs | ||
ORGANIZATION: hadenlabs | ||
DOCKER_PLATFORM: linux/amd64 | ||
REVIEWERS: luismayta | ||
PYTHON_VERSION: 3.11.5 | ||
NODE_VERSION: 18.18.2 | ||
TERRAFORM_VERSION: 1.8.4 | ||
GIT_IGNORES: python,node,go,zsh,sonar,java,maven,intellij+all,terraform,linux | ||
GOLANGCI_VERSION: 1.42.0 | ||
README_FILE: README.md | ||
GIT_IGNORES_CUSTOM: | | ||
bin | ||
.scannerwork | ||
.secrets | ||
public | ||
TMP_CHANGELOG.md | ||
.task | ||
.terraform.lock.hcl | ||
*.lock.hcl | ||
*.zip | ||
.external_modules | ||
vendor | ||
dotenv: | ||
- .env | ||
|
||
tasks: | ||
default: | ||
deps: | ||
- task: check | ||
cmds: | ||
- cmd: echo Application {{.PROJECT_NAME}} | ||
silent: true | ||
- task: version:default | ||
- task: summary | ||
- cmd: task -l | ||
silent: true | ||
|
||
summary: | ||
desc: "Summary information" | ||
cmds: | ||
- echo Go available {{.GO}} | ||
- echo Python available {{.PYTHON}} | ||
- echo Docker available {{.DOCKER}} | ||
- echo Node available {{.NODE}} | ||
silent: true | ||
|
||
check: | ||
desc: "Check all dependencies" | ||
deps: | ||
- python:check | ||
- changelog:check | ||
- git:check | ||
- docs:check | ||
|
||
readme: | ||
run: once | ||
desc: Generate Readme | ||
silent: true | ||
cmds: | ||
- >- | ||
gomplate --file {{.README_TEMPLATE}} --out {{.README_FILE}} --datasource config={{.README_YAML}} --datasource includes={{.README_INCLUDES}} | ||
- task: prettier | ||
|
||
prettier: | ||
run: once | ||
desc: Execute prettier files | ||
cmds: | ||
- task: prettier:all | ||
|
||
upgrade: | ||
run: once | ||
desc: Execute upgrade packages | ||
cmds: | ||
- poetry update | ||
- poetry run pre-commit autoupdate | ||
|
||
setup: | ||
desc: Setup dependences of project | ||
cmds: | ||
- >- | ||
[ -e ".env" ] || cp -rf .env.example .env | ||
- task: python:setup | ||
- task: python:precommit | ||
- task: git:setup | ||
|
||
environment: | ||
desc: Setup environment of project | ||
cmds: | ||
- task: python:environment | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters