-
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.
chore: addresses all the solid feedback
- Loading branch information
Showing
4 changed files
with
50 additions
and
26 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,28 +1,27 @@ | ||
# Taskit | ||
|
||
Taskit (said Task-kit or TK for short) is the Masterpoint [Taskfile](https://taskfile.dev/) Kit. We utilize this set of Taskfiles across clients as a means by which to share repeatable tasks like repo setup, tool automation, and similar shared scripting. | ||
Taskit (said task-kit or TK for short) is the Masterpoint [Taskfile](https://taskfile.dev/) Kit. We utilize this set of Taskfiles across clients as a means by which to share repeatable tasks like repo setup, tool automation, and similar shared scripting. | ||
|
||
## Using Taskit | ||
|
||
Taskit is built around the idea of being consumed by downstream repos. It is pulled through a standard Taskfile that you can find in [`exports/Taskfile.dist.yaml`](./exports/Taskfile.dist.yaml). | ||
|
||
The procedure to add it to a project is to do the following: | ||
|
||
1. Copy `exports/Taskfile.dist.yaml` to your project. | ||
2. Add the following lines to your project's `.gitignore`: | ||
1. Copy `exports/Taskfile.dist.yaml` to your project by running the following command: | ||
|
||
```gitignore | ||
.taskit/ | ||
.task/ | ||
.snaplet/snapshots/ | ||
```bash | ||
curl -sL https://raw.githubusercontent.com/masterpointio/taskit/main/exports/Taskfile.dist.yaml -o Taskfile.dist.yaml | ||
``` | ||
|
||
3. Run `task init` to initialize taskit by downloading this repo into your remote repo. Note, `git` is a requirement. | ||
4. Run `task --list` to list all newly available tasks from taskit. | ||
5. (Optional) Add a `.env.taskit` file which can include overrides for any variables in taskit. | ||
1. Run `task init` to initialize taskit by downloading this repo into your remote repo. | ||
1. Note, `git` is a requirement. | ||
1. Run `task --list` to list all newly available tasks from taskit. | ||
1. (Optional) Add a `.env.taskit` file which can include overrides for any variables in taskit. | ||
1. Now that the setup process for taskit is complete, you should commit and push the new configuration files to your repo. Well done 👏 | ||
|
||
## TODO | ||
|
||
- [x] Upstream various tasks from our distributed usage | ||
- [ ] Create a test harness + tests around tasks | ||
- [ ] Upstream various tasks from our distributed usage | ||
- [ ] Publish versions |
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,6 +1,6 @@ | ||
# This is the Taskfile responsible for managing Taskit in any consuming repository | ||
# This is the Taskfile responsible for managing taskit in any consuming repository | ||
# More information is available at https://github.com/masterpointio/taskit | ||
# This file is typically copied into the repo as-is and any required edits should be made both here and in the taskit repo (if applicable) | ||
# This file is typically cloned into the repo as-is and any required edits should be made both here and in the taskit repo (if applicable) | ||
# If any project specific changes are required, they should be made in a separate taskfiles/<module name>/Taskfile.yaml and then imported here. | ||
|
||
version: "3" | ||
|
@@ -24,12 +24,35 @@ vars: | |
|
||
tasks: | ||
default: | ||
desc: Initializes the Taskfile setup for this project by downloading the remote taskit Taskfile Kit. | ||
desc: Initializes taskit | ||
summary: | | ||
This sets up taskit for this project by cloning the taskit project to .taskit/. | ||
It also adds the taskit gitignore entries to the project's .gitignore file. | ||
You can find more information at https://github.com/masterpointio/taskit | ||
To set the branch that is cloned, set the `TASKIT_BRANCH`. | ||
To work on taskit modules locally, set the `TASKIT_LOCAL_PATH` to the path of the local taskit repo. | ||
This sets taskit to copy the files from the local repo instead of cloning the remote repo, whichs allows you to work on taskit locally. | ||
deps: [clean] | ||
silent: true | ||
aliases: [init] | ||
cmds: | ||
- printf "🚀 Initializing taskit...\n\n" | ||
- | | ||
if [[ -f .gitignore ]]; then | ||
echo "Adding taskit gitignore entries to existing .gitignore..." | ||
else | ||
echo "Creating .gitignore..." | ||
touch .gitignore | ||
fi | ||
if ! grep -q ".taskit" .gitignore; then | ||
echo -e "\n## Taskit files\n.taskit/\n.task/\n.snaplet/snapshots/" >> .gitignore | ||
fi | ||
- | | ||
echo -e "\n" | ||
if [[ -z "{{.TASKIT_LOCAL_PATH}}" ]]; then | ||
echo "Copying taskit from local path..." | ||
rsync -rq --exclude=.git --exclude= {{.TASKIT_LOCAL_PATH}} .taskit | ||
|
@@ -38,12 +61,11 @@ tasks: | |
git clone -b {{.TASKIT_BRANCH}} [email protected]:masterpointio/taskit.git .taskit | ||
fi | ||
echo -e "\n\n⚡ Taskit successfully initialized! ⚡\n" | ||
clean: | ||
desc: Cleans up the project's Task setup | ||
silent: true | ||
cmds: | ||
- | | ||
if [ -d .taskit ]; then | ||
rm -rf .taskit/ | ||
fi | ||
mkdir -p .taskit | ||
- rm -rf .taskit/ | ||
- mkdir -p .taskit |
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
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