1+ # Use a single bash shell for each job, and immediately exit on failure
2+ SHELL := bash
3+ .SHELLFLAGS := -ceu
4+ .ONESHELL :
5+
6+ # This doesn't work on directories.
7+ # See https://stackoverflow.com/questions/25752543/make-delete-on-error-for-directory-targets
8+ .DELETE_ON_ERROR :
9+
10+ # Don't print the commands in the file unless you specify VERBOSE. This is
11+ # # essentially the same as putting "@" at the start of each line.
12+ ifndef VERBOSE
13+ .SILENT :
14+ endif
15+
116ifdef CI
217LINTFLAGS := --reporter github-actions-logging
318FMTFLAGS := --lint --reporter github-actions-log
@@ -12,7 +27,6 @@ SCHEME := Coder\ Desktop
1227SWIFT_VERSION := 6.0
1328
1429MUTAGEN_RESOURCES := mutagen-agents.tar.gz mutagen-darwin-arm64 mutagen-darwin-amd64
15- MUTAGEN_VERSION := v0.18.1
1630
1731ifndef CURRENT_PROJECT_VERSION
1832 CURRENT_PROJECT_VERSION:=$(shell git describe --match 'v[0-9]*' --dirty='.devel' --always --tags)
@@ -41,8 +55,12 @@ setup: \
4155 $(addprefix $(PROJECT ) /Resources/,$(MUTAGEN_RESOURCES ) )
4256
4357# Mutagen resources
44- $(addprefix $(PROJECT ) /Resources/,$(MUTAGEN_RESOURCES ) ) :
45- curl -sL " https://storage.googleapis.com/coder-desktop/mutagen/$( MUTAGEN_VERSION) /$( shell basename " $@ " ) " -o " $@ "
58+ $(addprefix $(PROJECT ) /Resources/,$(MUTAGEN_RESOURCES ) ) : $(PROJECT ) /Resources/.mutagenversion
59+ version=$$(cat "$< " )
60+ filename=$$(basename "$@ ")
61+ url=" https://storage.googleapis.com/coder-desktop/mutagen/$$ {version}/$$ {filename}"
62+ echo " Downloading from $$ {url}"
63+ curl -sL $$ {url} -o " $@ "
4664 chmod +x " $@ "
4765
4866$(XCPROJECT ) : $(PROJECT ) /project.yml
0 commit comments