Skip to content

Commit 9181e36

Browse files
committed
improvement
1 parent 8ecc373 commit 9181e36

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

Coder Desktop/Resources/.gitkeep

Whitespace-only changes.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.18.1

Makefile

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
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+
116
ifdef CI
217
LINTFLAGS := --reporter github-actions-logging
318
FMTFLAGS := --lint --reporter github-actions-log
@@ -12,7 +27,6 @@ SCHEME := Coder\ Desktop
1227
SWIFT_VERSION := 6.0
1328

1429
MUTAGEN_RESOURCES := mutagen-agents.tar.gz mutagen-darwin-arm64 mutagen-darwin-amd64
15-
MUTAGEN_VERSION := v0.18.1
1630

1731
ifndef 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

Comments
 (0)