@@ -22,12 +22,15 @@ DATE := $(shell date +"%Y%m%d")
22
22
TIMESTAMP := $(shell date -u +'% Y-% m-% dT% H:% M:% SZ')
23
23
24
24
HAS_GIT := $(shell [ -d ${PROJECT_ROOT}/.git ] && echo "true")
25
+ ifeq (${PROJECT_VERSION},unknown)
25
26
ifeq (${HAS_GIT},true)
26
- GIT_COMMIT_HASH := $(shell git log -1 --format=%h)
27
- GIT_COMMIT_DIRTY := $(shell git diff --quiet || echo "-dirty")
28
- GIT_DESCRIBE := ${GIT_COMMIT_HASH}${GIT_COMMIT_DIRTY}
27
+ GIT_COMMIT_HASH := $(shell git log -1 --format=% h)
28
+ GIT_COMMIT_DIRTY := $(shell git diff --quiet || echo "-dirty")
29
+ GIT_DESCRIBE := $( shell git describe --dirty="-dirty" | sed -r "s/^v(. * ) /\1/")
29
30
else
30
- GIT_DESCRIBE := "unknown"
31
+ GIT_DESCRIBE := "unknown"
32
+ endif
33
+ PROJECT_VERSION := ${GIT_DESCRIBE}
31
34
endif
32
35
33
36
SOURCE_DIR := .
@@ -189,10 +192,10 @@ download:
189
192
#
190
193
# See: https://docs.conan.io/en/latest/mastering/policies.html
191
194
#
192
- conan create . ${PACKAGE_CHANNEL } \
195
+ conan create . ${PACKAGE_FQN } \
193
196
--build=never \
194
197
${CONAN_OPTIONS} || \
195
- conan create . ${PACKAGE_CHANNEL } \
198
+ conan create . ${PACKAGE_FQN } \
196
199
--build=${BUILD_POLICY} --build=${PACKAGE_NAME} \
197
200
${CONAN_OPTIONS}
198
201
@@ -204,7 +207,7 @@ package:
204
207
#
205
208
# See: https://docs.conan.io/en/latest/mastering/policies.html
206
209
#
207
- conan create . ${PACKAGE_CHANNEL } \
210
+ conan create . ${PACKAGE_FQN } \
208
211
--build=${BUILD_POLICY} --build=${PACKAGE_NAME} \
209
212
${CONAN_OPTIONS}
210
213
@@ -214,7 +217,7 @@ package-all:
214
217
# Conan will retrieve and build all dependencies unconditionally.
215
218
# Note that this cannot be called if the package is currently in editable mode.
216
219
#
217
- conan create . ${PACKAGE_CHANNEL } \
220
+ conan create . ${PACKAGE_FQN } \
218
221
--build \
219
222
${CONAN_OPTIONS}
220
223
@@ -225,7 +228,7 @@ package-outdated:
225
228
# Rebuilds will occur if package info has changed or a hash of the source
226
229
# code changes. Timestamps are not taken into account.
227
230
#
228
- conan create . ${PACKAGE_CHANNEL } \
231
+ conan create . ${PACKAGE_FQN } \
229
232
--build=outdated \
230
233
${CONAN_OPTIONS}
231
234
0 commit comments