From 71e536f07384bcb6c9e49d77fda9625fbb0c3014 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 16 Mar 2021 22:07:58 +0100 Subject: [PATCH] build: Use latest git tag as default version when building (#18) * build: Use latest git tag as default version when building * refactor: Only capitalize map file Co-authored-by: Mathias Rasmussen --- Makefile | 5 +++-- tools/Dockerfile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6efa7a9..0983d0f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # Current version -VERSION ?= v0.10 +TAG := $(shell git describe --tags --abbrev=0) +VERSION ?= $(TAG) # Target parameters LAYOUTS = A B C D E F G H I J K L M N O P Q R S T U V W Z @@ -93,7 +94,7 @@ all : $(HEX_TARGETS) @echo "\nbuild finished. built $(shell ls -Aq $(HEX_DIR) | wc -l) hex targets\n" $(OUTPUT_DIR)/%.OMF : $(OUTPUT_DIR)/%.OBJ - $(eval MAP := $(OUTPUT_DIR)/$(basename $(notdir $@)).MAP) + $(eval MAP := $(OUTPUT_DIR)/$(shell echo $(basename $(notdir $@)).MAP | tr 'a-z' 'A-Z')) @echo "LX51 : linking $< to $@" # Linking should produce exactly 1 warning @$(LX51) "$<" TO "$@" "$(LX51_FLAGS)" > /dev/null 2>&1; \ diff --git a/tools/Dockerfile b/tools/Dockerfile index 0b1e815..366acf4 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -1,7 +1,7 @@ FROM debian:10 RUN dpkg --add-architecture i386 RUN apt-get update -RUN apt-get install -y wget wine wine32 make +RUN apt-get install -y wget wine wine32 make git COPY .wine/user.reg /root/.wine/user.reg COPY .wine/system.reg /root/.wine/system.reg COPY .wine/drive_c/Keil_v5 /root/.wine/drive_c/Keil_v5