Skip to content

Commit d2ed4a9

Browse files
authored
fix(Makefile): add version validation checks (#44)
Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent b8d110a commit d2ed4a9

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.github/workflows/ci.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
with:
24-
fetch-depth: 1
24+
fetch-depth: 0
25+
fetch-tags: true
2526
persist-credentials: false
2627

27-
- run: git fetch --tags
28-
2928
- name: Switch XCode Version
3029
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
3130
with:
@@ -45,11 +44,10 @@ jobs:
4544
- name: Checkout
4645
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4746
with:
48-
fetch-depth: 1
47+
fetch-depth: 0
48+
fetch-tags: true
4949
persist-credentials: false
5050

51-
- run: git fetch --tags
52-
5351
- name: Switch XCode Version
5452
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
5553
with:
@@ -69,11 +67,10 @@ jobs:
6967
- name: Checkout
7068
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7169
with:
72-
fetch-depth: 1
70+
fetch-depth: 0
71+
fetch-tags: true
7372
persist-credentials: false
7473

75-
- run: git fetch --tags
76-
7774
- name: Setup Nix
7875
uses: ./.github/actions/nix-devshell
7976

.github/workflows/release.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1919
with:
20-
fetch-depth: 1
20+
fetch-depth: 0
21+
fetch-tags: true
2122
persist-credentials: false
2223

23-
- run: git fetch --tags
24-
2524
- name: Switch XCode Version
2625
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
2726
with:

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@ XCPROJECT := Coder\ Desktop/Coder\ Desktop.xcodeproj
1111
SCHEME := Coder\ Desktop
1212
SWIFT_VERSION := 6.0
1313

14-
MARKETING_VERSION=$(shell git describe --tags --abbrev=0 | sed 's/^v//' | sed 's/-.*$//')
1514
CURRENT_PROJECT_VERSION=$(shell git describe --tags)
15+
ifeq ($(strip $(CURRENT_PROJECT_VERSION)),)
16+
$(error CURRENT_PROJECT_VERSION cannot be empty)
17+
endif
18+
19+
MARKETING_VERSION=$(shell git describe --tags --abbrev=0 | sed 's/^v//' | sed 's/-.*$$//')
20+
ifeq ($(strip $(MARKETING_VERSION)),)
21+
$(error MARKETING_VERSION cannot be empty)
22+
endif
1623

1724
# Define the keychain file name first
1825
KEYCHAIN_FILE := app-signing.keychain-db

0 commit comments

Comments
 (0)