Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ help: build-docker-image
make output-dir - Create the host output directory\n\
make shell - Open an interactive shell inside the Docker container\n\
\n\
The <TAG_NAME> format is: v<MAJOR>.<MINOR>.<PATCH>.<BUILD>. The <BUILD> field is the\n\
first 7-digit of the HEAD commit SHA-1, which you can get by running 'make githead'.\n\
The <TAG_NAME> format follows the SemVer standard but excludes build metadata:\n\
v<MAJOR>.<MINOR>.<PATCH>[-<PRE_RELEASE>], where the <PRE_RELEASE> field is optional.\n\
Here are some <TAG_NAME> examples (use 'make taglist' to get all available tags):\n\
v0.0.1.189221c\n\
v1.1.0.bbf3b42\n\
v2.0.0.3b42778\n\""
v0.0.1\n\
v1.1.0-alpha.1\n\
v2.0.0-rc.3\n\""


.PHONY: build-docker-image
Expand All @@ -110,7 +110,7 @@ co: build-docker-image
"
@git archive $(TAG) | tar -x -C $(ARCHIVE_DIR)/argtable-$(TAG)
@$(DOCKER_CMD_PREFIX) sh -c "\
printf $(TAG) > $(ARCHIVE_DIR)/argtable-$(TAG)/version.tag \
printf "$(TAG)+git.$(shell git rev-parse --short=7 HEAD)" > $(ARCHIVE_DIR)/argtable-$(TAG)/version.tag \
"


Expand Down
4 changes: 3 additions & 1 deletion tools/build
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ get_ver () {
local argtable_ver
if [ -f "../version.tag" ]; then
argtable_ver=$(<../version.tag)
# Remove build metadata (everything after and including "+")
argtable_ver=${argtable_ver%%+*}
else
argtable_ver="master"
argtable_ver="v0.0.0"
fi
echo "$argtable_ver"
}
Expand Down