Skip to content

Commit 6de51c3

Browse files
authored
chore(task): improve built-in tasks (#6)
1 parent 306236a commit 6de51c3

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Taskfile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ tasks:
8686
update:
8787
desc: Update the project dev and runtime dependencies
8888
cmds:
89-
# This currently assumes uv was installed via uv; we will want to make it more flexible in the future
90-
- brew upgrade uv
89+
# This currently assumes uv was installed via uv (locally); we will want to make it more flexible in the future
90+
- '{{if ne .GITHUB_ACTIONS "true"}}brew upgrade uv{{end}}'
9191
- pre-commit autoupdate --freeze --jobs 4
9292
# Copy the newly updated config into the project template, excluding the exclude line
9393
- cat .pre-commit-config.yaml | grep -v ^exclude > '{{`{{cookiecutter.project_name|replace(" ", "")}}`}}/.pre-commit-config.yaml'

{{cookiecutter.project_name|replace(" ", "")}}/Taskfile.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,14 @@ tasks:
167167
update:
168168
desc: Update the project dev and runtime dependencies
169169
cmds:
170+
# This currently assumes uv was installed via uv (locally); we will want to make it more flexible in the future
171+
- '{{ "{{" }}if ne .GITHUB_ACTIONS "true"{{ "}}" }}brew upgrade uv{{ "{{" }}end{{ "}}" }}'
172+
- pre-commit autoupdate --freeze --jobs 4
170173
- uv lock --upgrade
171174
# This can take a while but it's required for the following step to update BuildKit in the docker driver
172-
- docker buildx rm multiplatform || true
173-
# Because we just destroyed the "multiplatform" builder instance, this will configure a new one. The next time
174-
# the host runs a `docker buildx build` it will rebuild the builder instance, updating its BuildKit
175+
- '{{ "{{" }}if eq .CLI_ARGS "all"{{ "}}" }}docker buildx rm multiplatform || true{{ "}}" }}end {{ "}}" }}'
176+
# If we just destroyed the "multiplatform" builder instance, this will configure a new one. The next time the host runs a `docker buildx build` it will
177+
# rebuild the builder instance, updating its BuildKit. There's no harm in running this even if we didn't do the `docker buildx rm` previously
175178
- task: init-docker-multiplatform
176179

177180
clean:

0 commit comments

Comments
 (0)