From 80265630420b566df686e227f8cd8acf813f954c Mon Sep 17 00:00:00 2001 From: amid Date: Tue, 30 May 2023 20:23:06 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B0=20=D1=83=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=81=D0=B8=D1=8F=D0=BC=D0=B8=20TAG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 20 ++++++++------------ VERSION.md | 1 - source/ubl-settings-datetime.cc | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 VERSION.md diff --git a/Makefile b/Makefile index ab913e2..a8ae105 100644 --- a/Makefile +++ b/Makefile @@ -15,13 +15,18 @@ 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}.cc; \ + 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}.cc; \ echo "-- Build path: ${CMAKE_BUILD_DIR}" depend: @@ -136,14 +141,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)"; \ @@ -153,5 +150,4 @@ help: echo "... compile"; \ echo "... install"; \ echo "... uninstall"; \ - echo "... clean"; \ - echo "... up_ver" \ No newline at end of file + 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 diff --git a/source/ubl-settings-datetime.cc b/source/ubl-settings-datetime.cc index 256c87f..6ec1c81 100644 --- a/source/ubl-settings-datetime.cc +++ b/source/ubl-settings-datetime.cc @@ -13,7 +13,7 @@ bool flag_load_global = false; bool flag_sync_hwclock = false; int socket_ext_id_I = 0; int socket_trd_id_I = 0; -string version_application = "2.3"; +string version_application = "2.4"; MainWindow* obj_main; void wrapper_help_show(GtkWidget *self, char* link, gpointer user_data) { if (self && user_data) {}