diff options
| author | mithe24 <mithe24@student.sdu.dk> | 2025-10-11 18:37:51 +0200 |
|---|---|---|
| committer | mithe24 <mithe24@student.sdu.dk> | 2025-10-29 13:49:57 +0100 |
| commit | 4d59ffc8f4a02781950780be7c277f99584c1f56 (patch) | |
| tree | b03b6397dfd8d943dd3bfc9f965e8a1a74bdcd7d /src/Makefile | |
| parent | 005530bd8eb3ba7ddc55d85f7941c576d6418488 (diff) | |
| download | sorter-4d59ffc8f4a02781950780be7c277f99584c1f56.tar.gz sorter-4d59ffc8f4a02781950780be7c277f99584c1f56.zip | |
build(version numbering): Added support for automatic version numbering
Added support for automatic version numbering using git version tags
Diffstat (limited to '')
| -rw-r--r-- | src/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index acd8d87..21057fa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,6 +6,7 @@ LDFLAGS := -g SRCS := $(shell find . -name '*.s')
OBJS := $(patsubst %.s, %.o, $(SRCS))
TARGET := sorter
+VER := $(shell git git describe --tags --abbrev=0 2> /dev/null || echo 'v0.0.0')
TEST_DIR := ./test
@@ -19,7 +20,7 @@ $(TARGET): $(OBJS) $(AS) $(ASFLAGS) $< -o $@
deploy: $(TARGET)
- tar -czvf $(TARGET).tar.gz $(TARGET)
+ tar -czvf $(TARGET)-$(VER).tar.gz $(TARGET)
clean:
rm -f $(TARGET) $(OBJS) *.tar.gz
|