Skip to content

Commit 7d65694

Browse files
committed
code
1 parent a50a3a3 commit 7d65694

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v0.0.37
2+
_commit: v0.0.37-1-g18bfaf5
33
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
44
description: Copier template for creating Python libraries and executables
55
python_ci_versions:

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@
5959
"initializeCommand": "sh .devcontainer/initialize-command.sh",
6060
"onCreateCommand": "sh .devcontainer/on-create-command.sh",
6161
"postStartCommand": "sh .devcontainer/post-start-command.sh"
62-
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): 53debcd8 # spellchecker:disable-line
62+
// Devcontainer context hash (do not manually edit this, it's managed by a pre-commit hook): d80b1dad # spellchecker:disable-line
6363
}

.github/workflows/dependabot-post-update.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
post-update:
1212
if: ${{ github.actor == 'dependabot[bot]' }}
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414

1515
steps:
1616
- name: Checkout code
@@ -24,7 +24,7 @@ jobs:
2424
git config user.email "github-actions[bot]@users.noreply.github.com"
2525
2626
- name: Update devcontainer hash
27-
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update
27+
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero
2828

2929
- name: Commit & push changes
3030
run: |

.github/workflows/hash_git_files.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def main():
138138
action="store_true",
139139
help="Update the hash in the devcontainer.json file based on all files relevant to devcontainer context",
140140
)
141+
_ = parser.add_argument("--exit-zero", action="store_true", help="Exit with code 0 even if the hash changes")
141142
args = parser.parse_args()
142143

143144
repo_path = args.folder
@@ -170,7 +171,8 @@ def main():
170171
print( # noqa: T201
171172
f"Updated {devcontainer_json_file} with the new hash: {overall_checksum_str}"
172173
)
173-
sys.exit(1) # Exit with non-zero code to indicate changes were made
174+
if not args.exit_zero:
175+
sys.exit(1) # Exit with non-zero code to indicate changes were made
174176
else:
175177
print(overall_checksum_str) # noqa: T201 # print this so that the value can be picked up via STDOUT when calling this in a CI pipeline or as a subprocess
176178

template/.github/workflows/dependabot-post-update.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
post-update:
1212
if: ${{ github.actor == 'dependabot[bot]' }}
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414

1515
steps:
1616
- name: Checkout code
@@ -24,7 +24,7 @@ jobs:
2424
git config user.email "github-actions[bot]@users.noreply.github.com"
2525
2626
- name: Update devcontainer hash
27-
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update
27+
run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update --exit-zero
2828

2929
- name: Commit & push changes
3030
run: |

template/.github/workflows/hash_git_files.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def main():
138138
action="store_true",
139139
help="Update the hash in the devcontainer.json file based on all files relevant to devcontainer context",
140140
)
141+
_ = parser.add_argument("--exit-zero", action="store_true", help="Exit with code 0 even if the hash changes")
141142
args = parser.parse_args()
142143

143144
repo_path = args.folder
@@ -170,7 +171,8 @@ def main():
170171
print( # noqa: T201
171172
f"Updated {devcontainer_json_file} with the new hash: {overall_checksum_str}"
172173
)
173-
sys.exit(1) # Exit with non-zero code to indicate changes were made
174+
if not args.exit_zero:
175+
sys.exit(1) # Exit with non-zero code to indicate changes were made
174176
else:
175177
print(overall_checksum_str) # noqa: T201 # print this so that the value can be picked up via STDOUT when calling this in a CI pipeline or as a subprocess
176178

0 commit comments

Comments
 (0)