From 138eaa3e796921aff9053a4cefe8ed4bfec5dd83 Mon Sep 17 00:00:00 2001 From: amid Date: Sat, 20 May 2023 21:24:29 +0600 Subject: [PATCH 1/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20Makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- VERSION.md | 2 +- source/ubl-settings-video.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 678ad21..8328de1 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ all: init build init: @echo "Initialize ..."; \ - sed -r "s/(version_application).*/\1 = \"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/ubl-settings-video.h; \ + sed -r "s/^(string version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/${PKGNAME}.h; \ echo "-- Build path: ${CMAKE_BUILD_DIR}" depend: diff --git a/VERSION.md b/VERSION.md index 2923038..ca75749 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -VERSION 2.1 +VERSION 2.2 diff --git a/source/ubl-settings-video.h b/source/ubl-settings-video.h index 19d458f..1935bc9 100644 --- a/source/ubl-settings-video.h +++ b/source/ubl-settings-video.h @@ -92,7 +92,7 @@ char *local; typedef char *string; -string version_application = "2.1"; +string version_application = "2.2"; #define _(String) gettext(String) From ce377df2c39953493eab8ee708d4538c94b9d13a Mon Sep 17 00:00:00 2001 From: amid Date: Sat, 20 May 2023 21:27:08 +0600 Subject: [PATCH 2/3] Bump version to 2.3 --- VERSION.md | 2 +- source/ubl-settings-video.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION.md b/VERSION.md index ca75749..15b1657 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -VERSION 2.2 +VERSION 2.3 diff --git a/source/ubl-settings-video.h b/source/ubl-settings-video.h index 1935bc9..20b379b 100644 --- a/source/ubl-settings-video.h +++ b/source/ubl-settings-video.h @@ -92,7 +92,7 @@ char *local; typedef char *string; -string version_application = "2.2"; +string version_application = "2.3"; #define _(String) gettext(String) From fdd91235623f1bafa3607849424d1eb947ff597e Mon Sep 17 00:00:00 2001 From: amid Date: Tue, 30 May 2023 22:54:58 +0600 Subject: [PATCH 3/3] Delete control VERSION.md --- Makefile | 21 ++++++++------------- VERSION.md | 1 - 2 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 VERSION.md diff --git a/Makefile b/Makefile index 8328de1..f9ef964 100644 --- a/Makefile +++ b/Makefile @@ -8,20 +8,24 @@ MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH)) CMAKE_COMMAND = cmake CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile -FILE_VERSION = VERSION.md DEPENDS = /bin/cmake PREFIX ?= /usr PKGNAME = $(MAKEFILE_DIR) default_target: all -.PHONY: all init depend debug prepare check build uninstall install clean up_ver help +.PHONY: all init depend debug prepare check build uninstall install clean help all: init build init: @echo "Initialize ..."; \ - sed -r "s/^(string version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/${PKGNAME}.h; \ + if [ -d ".git" ]; then \ + LATEST_TAG=$$(git describe --tags | sed 's/^v//'); \ + else \ + LATEST_TAG="0.0"; \ + fi; \ + sed -r "s/^(string version_application = ).*/\1\"$${LATEST_TAG}\";/" -i source/${PKGNAME}.h; \ echo "-- Build path: ${CMAKE_BUILD_DIR}" depend: @@ -151,14 +155,6 @@ clean: echo "Clean: OK"; \ fi -up_ver: - @CURRENT=$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2); \ - MAJOR=$$(cut -d. -f1 <<< $${CURRENT}); \ - MINOR=$$(cut -d. -f2 <<< $${CURRENT}); \ - VER="$${MAJOR}.$$(($${MINOR}+1))"; \ - sed "s/VERSION *[[:digit:]]*.*/VERSION $${VER}/" -i ${FILE_VERSION}; \ - echo "Updated version to VERSION.md: $${CURRENT} to $${VER}" - help: @echo "The following are some of the valid targets for this Makefile:"; \ echo "... all (the default if no target is provided)"; \ @@ -168,5 +164,4 @@ help: echo "... compile"; \ echo "... install"; \ echo "... uninstall"; \ - echo "... clean"; \ - echo "... up_ver" + echo "... clean" diff --git a/VERSION.md b/VERSION.md deleted file mode 100644 index 15b1657..0000000 --- a/VERSION.md +++ /dev/null @@ -1 +0,0 @@ -VERSION 2.3