Skip to content

Commit

Permalink
build(docs): generate docs (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismayta committed Dec 30, 2024
1 parent fb32576 commit 7ba6495
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 2 deletions.
153 changes: 151 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

# tasks

tasks for project
# 📦 Taskfile Templates Repository

This repository contains reusable **Taskfile templates** to standardize and simplify common tasks like running pre-commit hooks, generating changelogs, creating GitHub releases, and more.

## Requirements

Expand All @@ -28,7 +30,154 @@ This is a list of plugins that need to be installed previously to enjoy all the

## Usage

# 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
```
## Examples
Expand Down
2 changes: 2 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ tasks:
- >-
gomplate --file {{.README_TEMPLATE}} --out {{.README_FILE}} --datasource config={{.README_YAML}} --datasource includes={{.README_INCLUDES}}
- task: prettier

prettier:
Expand All @@ -135,6 +136,7 @@ tasks:
- >-
[ -e ".env" ] || cp -rf .env.example .env
- task: python:setup
- task: python:precommit
- task: git:setup
Expand Down

0 comments on commit 7ba6495

Please sign in to comment.