-
-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add repo taskfile for cleaning up repo
Signed-off-by: Devin Buhl <[email protected]>
- Loading branch information
Showing
5 changed files
with
47 additions
and
8 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
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 |
---|---|---|
|
@@ -8,6 +8,8 @@ kubeconfig | |
*.agekey | ||
*.pub | ||
*.key | ||
# Private | ||
.private | ||
# Ansible | ||
.venv* | ||
# Taskfile | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
# yaml-language-server: $schema=https://taskfile.dev/schema.json | ||
version: "3" | ||
|
||
tasks: | ||
|
||
clean: | ||
desc: Clean files and directories no longer needed after cluster bootstrap | ||
cmds: | ||
# Move bootstrap directory to gitignored directory | ||
- mkdir -p {{.ROOT}}/.private | ||
- mv {{.ROOT}}/bootstrap {{.ROOT}}/.private | ||
# Update renovate.json5 | ||
- sed -i '' 's/(..\.j2)\?(..\.j2)\?//g' {{.ROOT}}/.github/renovate.json5 | ||
- sed -i '' 's/addons/d' {{.ROOT}}/.github/renovate.json5 | ||
preconditions: | ||
- { msg: "bootstrap dir not found", sh: "test -d {{.ROOT}}/bootstrap" } | ||
- { msg: "renovate.json5 not found", sh: "test -f {{.ROOT_DIR}}/.github/renovate.json5" } | ||
|
||
reset: | ||
desc: Remove templated configuration files | ||
prompt: Remove templated configuration files... continue? | ||
cmds: | ||
- rm -rf {{.ROOT}}/.sops.yaml | ||
- rm -rf {{.ROOT}}/k0s-config.yaml | ||
- rm -rf {{.ROOT}}/ansible | ||
- rm -rf {{.ROOT}}/kubernetes | ||
|
||
reset-repo: | ||
desc: Set repo back to HEAD | ||
prompt: Set repo back to HEAD... continue? | ||
cmds: | ||
- task: reset | ||
- git reset --hard HEAD | ||
- git clean -f -d | ||
- git pull |
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