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
+
1
16
ifdef CI
2
17
LINTFLAGS := --reporter github-actions-logging
3
18
FMTFLAGS := --lint --reporter github-actions-log
@@ -12,7 +27,6 @@ SCHEME := Coder\ Desktop
12
27
SWIFT_VERSION := 6.0
13
28
14
29
MUTAGEN_RESOURCES := mutagen-agents.tar.gz mutagen-darwin-arm64 mutagen-darwin-amd64
15
- MUTAGEN_VERSION := v0.18.1
16
30
17
31
ifndef CURRENT_PROJECT_VERSION
18
32
CURRENT_PROJECT_VERSION:=$(shell git describe --match 'v[0-9]*' --dirty='.devel' --always --tags)
@@ -41,8 +55,12 @@ setup: \
41
55
$(addprefix $(PROJECT ) /Resources/,$(MUTAGEN_RESOURCES ) )
42
56
43
57
# 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 " $@ "
46
64
chmod +x " $@ "
47
65
48
66
$(XCPROJECT ) : $(PROJECT ) /project.yml
0 commit comments