diff --git a/.copier-answers.yml b/.copier-answers.yml index 883fc85..6cdf807 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,4 +1,4 @@ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY -_commit: v2.0.10 # __copier_update_available v2.0.15 -_src_path: gh:dafyddj/copier-bootstrap +_commit: v2.1.3 +_src_path: https://github.com/dafyddj/copier-bootstrap template_name: copier-packer-build diff --git a/.github/copier-renovate.json5 b/.github/copier-renovate.json5 deleted file mode 100644 index beb1746..0000000 --- a/.github/copier-renovate.json5 +++ /dev/null @@ -1,33 +0,0 @@ -{ - "enabledManagers": [ - "custom.regex", - ], - "extends": [ - ":dependencyDashboard", - ], - "allowedPostUpgradeCommands": [ - "^git stash$", - "^copier update", - ], - "branchPrefix": "copier-renovate/", - "requireConfig": "ignored", - "customManagers": [ - { - "customType": "regex", - "fileMatch": ["^.copier-answers.yml$"], - "matchStrings": [ - "_commit: (?\\S+) # __copier_update_available \\S+\\n_src_path: gh:(?\\S+)\\n", - "_commit: (?\\S+) # __copier_update_pending (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - ], - "autoReplaceStringTemplate": "_commit: {{#if currentDigest}}{{{currentDigest}}}{{else}}{{{currentValue}}}{{/if}} # __copier_update_pending {{{newValue}}}\n_src_path: gh:{{{depName}}}\n", - "datasourceTemplate": "github-tags", - }, - ], - "postUpgradeTasks": { - "commands": [ - "git stash", - "copier update --skip-answered --vcs-ref {{{newVersion}}}", - ], - "executionMode": "update", - }, -} diff --git a/.github/entrypoint.sh b/.github/entrypoint.sh deleted file mode 100755 index d123b4a..0000000 --- a/.github/entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -install-apt python3.8-venv pipx - -runuser -u ubuntu pipx install copier - -exec runuser -u ubuntu renovate diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 03794dc..1223d33 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,31 +1,12 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "enabledManagers": [ - "custom.regex", + "copier", "git-submodules", ], "extends": [ "config:recommended", ], - // `copier` template updates - // There are two conditions that we need to account for - // * a "clean" `.copier-answers.yml` file - // * update needed but not yet applied (and further updates could appear in this condition) - // `renovate` needs to be able to match both conditions for PRs to work properly - // We make a hacky use of the otherwise unused field `currentDigest` to hold the current copier template version - "customManagers": [ - { - "customType": "regex", - "fileMatch": ["^.copier-answers.yml$"], - "matchStrings": [ - "_commit: (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - "_commit: (?\\S+) # __copier_update_available (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - "_commit: (?\\S+) # __copier_update_needed (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - ], - "datasourceTemplate": "github-tags", - "autoReplaceStringTemplate": "_commit: {{#if currentDigest}}{{{currentDigest}}}{{else}}{{{currentValue}}}{{/if}} # __copier_update_available {{{newValue}}}\n_src_path: gh:{{{depName}}}\n", - }, - ], "git-submodules": { "enabled": true }, @@ -34,10 +15,6 @@ "matchManagers": ["git-submodules"], "automerge": true, }, - { - "matchManagers": ["custom.regex"], - "commitMessageSuffix": "available", - }, ], "platformAutomerge": false, } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 812d056..924476d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,10 +26,10 @@ jobs: runs-on: ubuntu-latest env: # renovate: datasource=github-releases depName=actions/python-versions extractVersion=^(?\S+)-\d+$ - PYTHON_VERSION: 3.12.3 + PYTHON_VERSION: 3.12.5 steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 with: python-version: ${{ env.PYTHON_VERSION }} - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 @@ -39,7 +39,7 @@ jobs: if: fromJSON(needs.should-run.outputs.should-run) runs-on: ubuntu-latest steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: fetch-depth: 0 # `copier` prefers full-history clones submodules: true @@ -63,8 +63,8 @@ jobs: contents: write runs-on: ubuntu-latest steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - - uses: codfish/semantic-release-action@b0e57c976bf8f74b2454f59a30e4a1b5f11727b4 # v3.3.0 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: codfish/semantic-release-action@9a999e0cdb207de2c9d9d4276860435727818989 # v3.4.1 with: plugins: | [ "@semantic-release/commit-analyzer", diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml deleted file mode 100644 index aaaf6f8..0000000 --- a/.github/workflows/renovate.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Self-hosted Renovate - -on: - workflow_dispatch: - -jobs: - renovate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - - uses: actions/create-github-app-token@a0de6af83968303c8c955486bf9739a57d23c7f1 # v1.10.0 - id: app-token - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} - - name: Self-hosted Renovate - uses: renovatebot/github-action@063e0c946b9c1af35ef3450efc44114925d6e8e6 # v40.1.11 - with: - configurationFile: .github/copier-renovate.json5 - docker-cmd-file: .github/entrypoint.sh - docker-user: root - token: ${{ steps.app-token.outputs.token }} - env: - LOG_LEVEL: debug - RENOVATE_DRY_RUN: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} - RENOVATE_REPOSITORIES: ${{ github.repository }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac30bb7..7195556 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: args: [--assume-in-merge] - id: check-yaml - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.4 + rev: 0.29.2 hooks: - id: check-github-workflows name: Check GitHub workflows with check-jsonschema diff --git a/template/.github/copier-renovate.json5 b/template/.github/copier-renovate.json5 deleted file mode 100644 index beb1746..0000000 --- a/template/.github/copier-renovate.json5 +++ /dev/null @@ -1,33 +0,0 @@ -{ - "enabledManagers": [ - "custom.regex", - ], - "extends": [ - ":dependencyDashboard", - ], - "allowedPostUpgradeCommands": [ - "^git stash$", - "^copier update", - ], - "branchPrefix": "copier-renovate/", - "requireConfig": "ignored", - "customManagers": [ - { - "customType": "regex", - "fileMatch": ["^.copier-answers.yml$"], - "matchStrings": [ - "_commit: (?\\S+) # __copier_update_available \\S+\\n_src_path: gh:(?\\S+)\\n", - "_commit: (?\\S+) # __copier_update_pending (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - ], - "autoReplaceStringTemplate": "_commit: {{#if currentDigest}}{{{currentDigest}}}{{else}}{{{currentValue}}}{{/if}} # __copier_update_pending {{{newValue}}}\n_src_path: gh:{{{depName}}}\n", - "datasourceTemplate": "github-tags", - }, - ], - "postUpgradeTasks": { - "commands": [ - "git stash", - "copier update --skip-answered --vcs-ref {{{newVersion}}}", - ], - "executionMode": "update", - }, -} diff --git a/template/.github/entrypoint.sh b/template/.github/entrypoint.sh deleted file mode 100755 index d123b4a..0000000 --- a/template/.github/entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -install-apt python3.8-venv pipx - -runuser -u ubuntu pipx install copier - -exec runuser -u ubuntu renovate diff --git a/template/.github/renovate.json5 b/template/.github/renovate.json5 index 03794dc..1223d33 100644 --- a/template/.github/renovate.json5 +++ b/template/.github/renovate.json5 @@ -1,31 +1,12 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "enabledManagers": [ - "custom.regex", + "copier", "git-submodules", ], "extends": [ "config:recommended", ], - // `copier` template updates - // There are two conditions that we need to account for - // * a "clean" `.copier-answers.yml` file - // * update needed but not yet applied (and further updates could appear in this condition) - // `renovate` needs to be able to match both conditions for PRs to work properly - // We make a hacky use of the otherwise unused field `currentDigest` to hold the current copier template version - "customManagers": [ - { - "customType": "regex", - "fileMatch": ["^.copier-answers.yml$"], - "matchStrings": [ - "_commit: (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - "_commit: (?\\S+) # __copier_update_available (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - "_commit: (?\\S+) # __copier_update_needed (?\\S+)\\n_src_path: gh:(?\\S+)\\n", - ], - "datasourceTemplate": "github-tags", - "autoReplaceStringTemplate": "_commit: {{#if currentDigest}}{{{currentDigest}}}{{else}}{{{currentValue}}}{{/if}} # __copier_update_available {{{newValue}}}\n_src_path: gh:{{{depName}}}\n", - }, - ], "git-submodules": { "enabled": true }, @@ -34,10 +15,6 @@ "matchManagers": ["git-submodules"], "automerge": true, }, - { - "matchManagers": ["custom.regex"], - "commitMessageSuffix": "available", - }, ], "platformAutomerge": false, } diff --git a/template/.github/workflows/renovate.yml b/template/.github/workflows/renovate.yml deleted file mode 100644 index aaaf6f8..0000000 --- a/template/.github/workflows/renovate.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Self-hosted Renovate - -on: - workflow_dispatch: - -jobs: - renovate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - - uses: actions/create-github-app-token@a0de6af83968303c8c955486bf9739a57d23c7f1 # v1.10.0 - id: app-token - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} - - name: Self-hosted Renovate - uses: renovatebot/github-action@063e0c946b9c1af35ef3450efc44114925d6e8e6 # v40.1.11 - with: - configurationFile: .github/copier-renovate.json5 - docker-cmd-file: .github/entrypoint.sh - docker-user: root - token: ${{ steps.app-token.outputs.token }} - env: - LOG_LEVEL: debug - RENOVATE_DRY_RUN: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} - RENOVATE_REPOSITORIES: ${{ github.repository }} diff --git a/test/GenerateProject/catalogue.tt b/test/GenerateProject/catalogue.tt index 7948938..7071954 100644 --- a/test/GenerateProject/catalogue.tt +++ b/test/GenerateProject/catalogue.tt @@ -2,12 +2,9 @@ The following new files/directories were created: ----.copier-answers.yml ----.github ---------copier-renovate.json5 ---------entrypoint.sh --------renovate.json5 --------workflows ------------libbuild.yml -------------renovate.yml ----.gitignore ----.pre-commit-config.yaml ----bin diff --git a/test/GenerateProject/stderr.tt b/test/GenerateProject/stderr.tt index 0f3352e..74901dc 100644 --- a/test/GenerateProject/stderr.tt +++ b/test/GenerateProject/stderr.tt @@ -1,7 +1,7 @@ -/opt/homebrew/Cellar/copier/9.2.0/libexec/lib/python3.12/site-packages/copier/vcs.py:202: DirtyLocalWarning: Dirty template changes included automatically. +/opt/homebrew/Cellar/copier/9.1.1/libexec/lib/python3.12/site-packages/copier/vcs.py:200: DirtyLocalWarning: Dirty template changes included automatically. warn( -Copying from template version 0.0.0.post2.dev0+2261517 +Copying from template version 1.3.2.post1.dev0+c6db195  identical .  create .copier-answers.yml  create .github diff --git a/test/SetBoxName/catalogue.tt b/test/SetBoxName/catalogue.tt index 7948938..7071954 100644 --- a/test/SetBoxName/catalogue.tt +++ b/test/SetBoxName/catalogue.tt @@ -2,12 +2,9 @@ The following new files/directories were created: ----.copier-answers.yml ----.github ---------copier-renovate.json5 ---------entrypoint.sh --------renovate.json5 --------workflows ------------libbuild.yml -------------renovate.yml ----.gitignore ----.pre-commit-config.yaml ----bin