@@ -32,19 +32,29 @@ $(error MUTAGEN_VERSION must be a valid version)
3232endif
3333
3434ifndef CURRENT_PROJECT_VERSION
35- CURRENT_PROJECT_VERSION: =$(shell git describe --match 'v[0-9]* ' --dirty='.devel' --always --tags)
35+ # Must be X.Y.Z[.N]
36+ CURRENT_PROJECT_VERSION: =$(shell ./scripts/version.sh)
3637endif
3738ifeq ($(strip $(CURRENT_PROJECT_VERSION ) ) ,)
3839$(error CURRENT_PROJECT_VERSION cannot be empty)
3940endif
4041
4142ifndef MARKETING_VERSION
42- MARKETING_VERSION: =$(shell git describe --match 'v[0-9]* ' --tags --abbrev=0 | sed 's/^v//' | sed 's/-.* $$//')
43+ # Must be X.Y.Z
44+ MARKETING_VERSION: =$(shell ./scripts/version.sh --short)
4345endif
4446ifeq ($(strip $(MARKETING_VERSION ) ) ,)
4547$(error MARKETING_VERSION cannot be empty)
4648endif
4749
50+ ifndef GIT_COMMIT_HASH
51+ # Must be a valid git commit hash
52+ GIT_COMMIT_HASH := $(shell ./scripts/version.sh --hash)
53+ endif
54+ ifeq ($(strip $(GIT_COMMIT_HASH ) ) ,)
55+ $(error GIT_COMMIT_HASH cannot be empty)
56+ endif
57+
4858# Define the keychain file name first
4959KEYCHAIN_FILE := app-signing.keychain-db
5060# Use shell to get the absolute path only if the file exists
@@ -70,6 +80,7 @@ $(XCPROJECT): $(PROJECT)/project.yml
7080 EXT_PROVISIONING_PROFILE_ID=${EXT_PROVISIONING_PROFILE_ID} \
7181 CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION ) \
7282 MARKETING_VERSION=$(MARKETING_VERSION ) \
83+ GIT_COMMIT_HASH=$(GIT_COMMIT_HASH ) \
7384 xcodegen
7485
7586$(PROJECT ) /VPNLib/vpn.pb.swift : $(PROJECT ) /VPNLib/vpn.proto
0 commit comments