Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6e7add

Browse files
committed
validate mutagen version
1 parentfb55513 commitc6e7add

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

‎Makefile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Usea singlebash shell for each job, and immediately exit on failure
1+
# Use bash and immediately exit on failure
22
SHELL := bash
33
.SHELLFLAGS := -ceu
4-
.ONESHELL:
54

65
# This doesn't work on directories.
76
# See https://stackoverflow.com/questions/25752543/make-delete-on-error-for-directory-targets
@@ -14,11 +13,11 @@ ifndef VERBOSE
1413
endif
1514

1615
ifdefCI
17-
LINTFLAGS := --reporter github-actions-logging
18-
FMTFLAGS := --lint --reporter github-actions-log
16+
LINTFLAGS := --reporter github-actions-logging
17+
FMTFLAGS := --lint --reporter github-actions-log
1918
else
20-
LINTFLAGS :=
21-
FMTFLAGS :=
19+
LINTFLAGS :=
20+
FMTFLAGS :=
2221
endif
2322

2423
PROJECT := Coder\ Desktop
@@ -27,6 +26,12 @@ SCHEME := Coder\ Desktop
2726
SWIFT_VERSION := 6.0
2827

2928
MUTAGEN_RESOURCES := mutagen-agents.tar.gz mutagen-darwin-arm64 mutagen-darwin-amd64
29+
ifndefMUTAGEN_VERSION
30+
MUTAGEN_VERSION:=$(shell grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' $(PROJECT)/Resources/.mutagenversion)
31+
endif
32+
ifeq ($(strip$(MUTAGEN_VERSION)),)
33+
$(error MUTAGEN_VERSION must be a valid version)
34+
endif
3035

3136
ifndefCURRENT_PROJECT_VERSION
3237
CURRENT_PROJECT_VERSION:=$(shell git describe --match 'v[0-9]*' --dirty='.devel' --always --tags)
@@ -56,9 +61,7 @@ setup: \
5661

5762
# Mutagen resources
5863
$(addprefix$(PROJECT)/Resources/,$(MUTAGEN_RESOURCES)):$(PROJECT)/Resources/.mutagenversion
59-
version=$$(printf "%s" "$$(cat "$<")")
60-
filename=$$(basename "$@")
61-
url="https://storage.googleapis.com/coder-desktop/mutagen/$${version}/$${filename}"
64+
url="https://storage.googleapis.com/coder-desktop/mutagen/$(MUTAGEN_VERSION)/$$(basename"$@")"
6265
echo"Downloading from$${url}"
6366
curl -sL$${url} -o"$@"
6467
chmod +x"$@"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp