diff --git a/.config/taskfiles/common/Taskfile-update.yml b/.config/taskfiles/common/Taskfile-update.yml index f5b95553..6015f75d 100644 --- a/.config/taskfiles/common/Taskfile-update.yml +++ b/.config/taskfiles/common/Taskfile-update.yml @@ -256,6 +256,11 @@ tasks: - > readme generate --headingPrefix '{}' --silent --config .variables.json --input ".config/docs/{{.README_TEMPLATE}}" + - | + if [ -f docs/img/logo-full.png ]; then + sed -i 's/\/-\/raw\/master\/logo.png/\/-\/raw\/master\/docs\/img\/logo-full.png/' README.md + sed -i 's/width="148" height="148"/height="69"/' README.md + fi - task: markdown:scrub vars: SCRUB_FILE: README.md diff --git a/.config/taskfiles/common/Taskfile.yml b/.config/taskfiles/common/Taskfile.yml index b9e2023d..44a86ab9 100644 --- a/.config/taskfiles/common/Taskfile.yml +++ b/.config/taskfiles/common/Taskfile.yml @@ -134,10 +134,10 @@ tasks: sh: mktemp cmds: - | - curl -sSL '{{.MODEL_TASKFILE}}' > '{{.MODEL_TMP}}' - export ZXXXY="$(yq e '.' {{.MODEL_TMP}})" + curl -sSL '{{.MODEL_TASKFILE}}' > '{{.MODEL_TMP}}.yml' + export ZXXXY="$(yq e '.' {{.MODEL_TMP}}.yml)" yq e -i '. | .vars = (env(ZXXXY) | .vars) | .env = (env(ZXXXY) | .env)' Taskfile.yml - yq eval-all -i 'select(fileIndex == 0) * select(fileIndex == 1)' '{{.MODEL_TMP}}' Taskfile.yml + yq eval-all -i 'select(fileIndex == 0) * select(fileIndex == 1)' '{{.MODEL_TMP}}.yml' Taskfile.yml requirements: deps: diff --git a/.config/taskfiles/fix/Taskfile.yml b/.config/taskfiles/fix/Taskfile.yml index 76f3784d..f27d7a26 100644 --- a/.config/taskfiles/fix/Taskfile.yml +++ b/.config/taskfiles/fix/Taskfile.yml @@ -277,11 +277,11 @@ tasks: start: Running Prettier on {{if .CLI_ARGS}}`{{.CLI_ARGS}}`{{else}}project{{end}} cmds: - cmd: | - prettier --plugin node_modules/prettier-plugin-toml-fixed --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ + prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ --write {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}} || EXIT_CODE=$? if [ -n "$EXIT_CODE" ]; then .config/log warn 'Failed to run `prettier` - falling back to `prettier`' - prettier --plugin node_modules/prettier-plugin-toml-fixed --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ + prettier --ignore-path {{.PRETTIERIGNORE_CONFIG}} \ --write {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}} fi ignore_error: true diff --git a/.config/taskfiles/git/Taskfile-hook.yml b/.config/taskfiles/git/Taskfile-hook.yml index 8ec7cd2b..fbfc1b49 100644 --- a/.config/taskfiles/git/Taskfile-hook.yml +++ b/.config/taskfiles/git/Taskfile-hook.yml @@ -88,6 +88,9 @@ tasks: # remote_ref -> refs/heads/master # remote_sha -> 9901a2eb2f34d5744276a80c4b339a88a92a7b53 REMOTE_BRANCH="$(echo $remote_ref | sed 's/^[^\/]*\/[^\/]*\///')" + if [ "$(echo "$HOST" | cut -c1-8)" == 'https://' ]; then + HOST="$(echo "$HOST" | cut -c8)" + fi .config/log star "Repository -----> https://$HOST/$ORG/$PROJECT" if [ "$HOST" == 'gitlab.com' ]; then if [ "$REMOTE_BRANCH" != 'master' ]; then diff --git a/.config/taskfiles/git/Taskfile.yml b/.config/taskfiles/git/Taskfile.yml index b4554582..141d5309 100644 --- a/.config/taskfiles/git/Taskfile.yml +++ b/.config/taskfiles/git/Taskfile.yml @@ -70,14 +70,14 @@ tasks: - git init - git remote add origin "{{.GITLAB_REPO}}" - git add --all - - git commit --quiet -m "🧐 refactor(submodule): Adding folder/project to its own git repository." + - git commit --quiet -m "🧐 refactor(submodule) Adding folder/project to its own git repository." - git push --quiet -u --no-progress origin master - cd .. && rm -rf {{.BASENAME}} - cd .. && git add {{.BASENAME}} - - cd .. && git commit --quiet -m "🧐 refactor(submodule): Removing folder which will now be a submodule." + - git commit --quiet -m "🧐 refactor(submodule) Removing folder which will now be a submodule." - cd .. && git submodule add -b master "{{.GITLAB_REPO}}" {{.BASENAME}} - cd .. && git add {{.BASENAME}} - - cd .. && git commit --quiet -m "🧐 refactor(submodule): Adding new submodule which was previously a directory." + - cd .. && git commit --quiet -m "🧐 refactor(submodule) Adding new submodule which was previously a directory." - cd .. && git push --quiet -u --no-progress origin HEAD preconditions: - sh: '[[ ! $(git rev-parse --git-dir) =~ ".git/modules" ]]' diff --git a/Taskfile.yml b/Taskfile.yml index df8818ac..aec93b18 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -181,8 +181,8 @@ includes: lint:prose: taskfile: ./.config/taskfiles/lint/Taskfile-prose.yml optional: true - localhost: - taskfile: ./../../Taskfile-localhost.yml + local: + taskfile: ./../../../Taskfile-local.yml optional: true log: optional: true @@ -558,7 +558,7 @@ tasks: - | task --list > /dev/null || (echo "ERROR: Invalid Taskfiles!" && exit 1) git add --all - - "HUSKY=0 git commit -m '\U0001F527 chore(tweak)": quick minor update' --no-verify + - ".config/log info 'Bypassing git hooks for git commit'\nHUSKY=0 git commit -m \"\U0001F527 chore(tweak): quick minor update\" --no-verify\n" - git push origin master devcontainer: deps: @@ -840,7 +840,7 @@ tasks: start: Publishing `semantic-release` update via `task publish:force` success: Successfully published update via `task publish:force` cmds: - - "HUSKY=0 git commit -a --allow-empty -m '\U0001F528 chore(bump): Forced semantic-release {{.UPDATE_LEVEL}}' -n\n" + - ".config/log info 'Bypassing git hooks for git commit'\nHUSKY=0 git commit -a --allow-empty -m '\U0001F528 chore(bump): Forced semantic-release {{.UPDATE_LEVEL}}' --no-verify\n" - task: publish pull:upstream: desc: Pull from upstream repositories @@ -1067,16 +1067,6 @@ tasks: This task calls `npm run test` which functions differently based on the definition made in `package.json` under the `.scripts.test` key. - ## Ansible Project Functionality - - For Ansible projects, this task wraps all the supported test methods for Ansible plays into a - convenient multi-question prompt system that supports: - - 1. Docker tests - 2. Headless VirtualBox tests - 3. VirtualBox Desktop tests which are not automatically destroyed - 4. Running the play locally - 5. Running the play over SSH on a remote target vars: NONINTERACTIVE_MISSING_TEST_CMD: There must be a `.scripts.test` definition in `package.json`! cmds: diff --git a/start.sh b/start.sh index 5204f6b6..4a73434c 100644 --- a/start.sh +++ b/start.sh @@ -9,8 +9,7 @@ # ensure that the latest upstream changes are retrieved, that the project is # properly generated with them, and that all the development dependencies are installed. # Documentation on Taskfile.yml syntax can be found [here](https://taskfile.dev/). -git config url."https://gitlab.com/".insteadOf git@gitlab.com: - git config url."https://github.com/".insteadOf git@github.com: + set -eo pipefail # @description Initialize variables @@ -487,6 +486,7 @@ function ensureTaskfiles() { # shellcheck disable=SC2016 logger warn 'Something is wrong with the `Taskfile.yml` - grabbing main `Taskfile.yml`' git checkout HEAD~1 -- Taskfile.yml + task --list || curl -sSL https://gitlab.com/megabyte-labs/common/shared/-/raw/master/Taskfile.yml if ! task donothing; then logger error 'Error appears to be with main Taskfile.yml' else