From 4c009a7572d7b6dc208687ef5b8391f81ac4f2c8 Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Fri, 3 Jul 2020 17:00:12 +0300 Subject: [PATCH] Update version everywehere with a single command 'update_version_everywhere.sh' --- flameshot.pro | 7 +++++-- update_version_everywhere.sh | 15 +++++++++++++++ win_setup/flameshot.iss | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 update_version_everywhere.sh diff --git a/flameshot.pro b/flameshot.pro index 257e53f0..a1de7bc1 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -7,11 +7,14 @@ win32:LIBS += -luser32 -lshell32 BASE_VERSION = 0.7.1 -TAG_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags) +TAG_VERSION = "$$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)" isEmpty(TAG_VERSION){ TAG_VERSION = $$BASE_VERSION + DEFINES += APP_VERSION=\\\"$$BASE_VERSION\\\" +} +else { + DEFINES += APP_VERSION=\\\"$$BASE_VERSION-$$TAG_VERSION\\\" } -DEFINES += APP_VERSION=\\\"$$TAG_VERSION\\\" QT += core gui widgets network svg diff --git a/update_version_everywhere.sh b/update_version_everywhere.sh new file mode 100755 index 00000000..241f7b30 --- /dev/null +++ b/update_version_everywhere.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +BASE_VERSION_OLD=0.7.0 +BASE_VERSION_NEW=0.7.1 + +sed -i "s/BASE_VERSION = ${BASE_VERSION_OLD}/BASE_VERSION = ${BASE_VERSION_NEW}/g" flameshot.pro + +sed -i "s/AppVersion=${BASE_VERSION_OLD}/AppVersion=${BASE_VERSION_NEW}/g" ./win_setup/flameshot.iss +sed -i "s/VersionInfoVersion=${BASE_VERSION_OLD}/VersionInfoVersion=${BASE_VERSION_NEW}/g" ./win_setup/flameshot.iss + +sed -i "s/version: ${BASE_VERSION_OLD}/version: ${BASE_VERSION_NEW}/g" appveyor.yml + +sed -i "s/VERSION=${BASE_VERSION_OLD}/VERSION=${BASE_VERSION_NEW}/g" .travis.yml + +qmake diff --git a/win_setup/flameshot.iss b/win_setup/flameshot.iss index aaab83a0..6ab1b3f7 100644 --- a/win_setup/flameshot.iss +++ b/win_setup/flameshot.iss @@ -6,9 +6,9 @@ [Setup] AppName=FlameShot -AppVersion=1.0.0.1 +AppVersion=0.7.1 AppCopyright=NameCheap inc. -VersionInfoVersion=1.0.0.1 +VersionInfoVersion=0.7.1 WizardStyle=modern DefaultDirName={autopf}\FlameShot DefaultGroupName=FlameShot