Release management is integrated into update_release_version.sh - appveyor fix

This commit is contained in:
Yuriy Puchkov
2020-07-09 14:19:41 +03:00
parent 200bbc8c2d
commit 827f8245f5
5 changed files with 19 additions and 24 deletions

View File

@@ -17,7 +17,7 @@ env:
# Environment variables for packaging
- PRODUCT=flameshot
#TODO: we should take version from the last tag in git history + build number
- VERSION=0.7.3-74e563e
- VERSION=0.7.3
- RELEASE=1
- ARCH=x86_64
# Dockerfile from https://github.com/flameshotapp/flameshot-docker-images

View File

@@ -1,7 +1,7 @@
image: Visual Studio 2015
#TODO: we should take version from the last tag in git history + build number
version: 0.7.3-74e563e.{build}
version: 0.7.3.{build}
# Major_Version_Number.Minor_Version_Number.Patch_Number.Build_Number
skip_branch_with_pr: true

View File

@@ -6,17 +6,14 @@
win32:LIBS += -luser32 -lshell32
BASE_VERSION = 0.7.3-74e563e
#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=\\\"$$BASE_VERSION\\\"
BASE_VERSION = 0.7.3
TAG_VERSION = "$$system(git --git-dir $$PWD/.git rev-parse --short HEAD)"
isEmpty(TAG_VERSION){
DEFINES += APP_VERSION=\\\"$$BASE_VERSION\\\"
}
else {
DEFINES += APP_VERSION=\\\"$$BASE_VERSION-$$TAG_VERSION\\\"
}
QT += core gui widgets network svg
@@ -35,7 +32,7 @@ win32:RC_ICONS += img/app/flameshot.ico
QMAKE_TARGET_COMPANY = "NameCheap"
QMAKE_TARGET_COPYRIGHT = "GNU General Public License v3.0"
QMAKE_TARGET_DESCRIPTION = "Flameshot - S3 bucket edition"
VERSION = $$BASE_VERSION + "." + $$TAG_VERSION
VERSION = $$BASE_VERSION
#release: DESTDIR = build/release
#debug: DESTDIR = build/debug

View File

@@ -2,19 +2,17 @@
BASE_VERSION_NEW="0.7.3"
BASE_VERSION_CUR=$(cat flameshot.pro |grep "[0-9]\+\.[0-9]\+\.[0-9]\+-[0-9a-e]*" |awk "{print \$3}")
GIT_SHORT_HASH=$(git rev-parse --short HEAD)
BASE_VERSION_NEW="${BASE_VERSION_NEW}-${GIT_SHORT_HASH}"
BASE_VERSION_CUR_EXT=$(cat flameshot.pro |grep "[0-9]\+\.[0-9]\+\.[0-9]\+-[0-9a-e]*" |awk "{print \$3}")
BASE_VERSION_CUR=$(echo "${BASE_VERSION_CUR_EXT}" |cut -d '-' -f1)
BASE_VERSION_NEW_EXT="${BASE_VERSION_NEW}-$(git rev-parse --short HEAD)"
if [ "${BASE_VERSION_CUR}" == "${BASE_VERSION_NEW}" ]; then
if [ "${BASE_VERSION_CUR_EXT}" == "${BASE_VERSION_NEW_EXT}" ]; then
echo "Current and new versions are the same, no action required"
exit 1
fi
TAG_EXISTS=$(git ls-remote --tags origin |grep "refs/tags/v${BASE_VERSION_NEW}")
TAG_EXISTS=$(git ls-remote --tags origin |grep "refs/tags/v${BASE_VERSION_NEW_EXT}")
if [ "" != "${TAG_EXISTS}" ]; then
echo "Tag already exists: ${TAG_EXISTS}"
echo "Please update to another version or remove git tag"
@@ -23,7 +21,7 @@ fi
# update version to a new one
sed -i "s/BASE_VERSION = ${BASE_VERSION_CUR}/BASE_VERSION = ${BASE_VERSION_NEW}/g" flameshot.pro
sed -i "s/AppVersion=${BASE_VERSION_CUR}/AppVersion=${BASE_VERSION_NEW}/g" ./win_setup/flameshot.iss
sed -i "s/AppVersion=${BASE_VERSION_CUR_EXT}/AppVersion=${BASE_VERSION_NEW_EXT}/g" ./win_setup/flameshot.iss
sed -i "s/VersionInfoVersion=${BASE_VERSION_CUR}/VersionInfoVersion=${BASE_VERSION_NEW}/g" ./win_setup/flameshot.iss
sed -i "s/version: ${BASE_VERSION_CUR}/version: ${BASE_VERSION_NEW}/g" appveyor.yml
sed -i "s/VERSION=${BASE_VERSION_CUR}/VERSION=${BASE_VERSION_NEW}/g" .travis.yml

View File

@@ -6,9 +6,9 @@
[Setup]
AppName=Flameshot
AppVersion=0.7.3-74e563e
AppVersion=0.7.3
AppCopyright=NameCheap inc.
VersionInfoVersion=0.7.3-74e563e
VersionInfoVersion=0.7.3
WizardStyle=modern
DefaultDirName={autopf}\Flameshot
DefaultGroupName=Flameshot