diff --git a/release-scripts/VERSIONS.inc b/release-scripts/VERSIONS.inc deleted file mode 100644 index 509ab402cb..0000000000 --- a/release-scripts/VERSIONS.inc +++ /dev/null @@ -1,8 +0,0 @@ -[default] -MAJOR_VERSION=5 -MINOR_VERSION=1 -PATCH_VERSION=0 -BRANCH=5.1 - -OLD_SHA1=5.0 -NEW_SHA1=v5.1.0 diff --git a/release-scripts/create_log.py b/release-scripts/create_log.py index ce75bf8689..2baaf5e159 100755 --- a/release-scripts/create_log.py +++ b/release-scripts/create_log.py @@ -1,137 +1,137 @@ #!/usr/bin/env python3 # stolen from releaseme/plasma, which was stolen from release-tools Applications/15.04 branch # ported to Python 3 and fixed the worst issues + removed Plasma-related bits --Kevin from __future__ import print_function import configparser import os import subprocess import sys import cgi THIS_DIR = os.path.dirname(os.path.realpath(__file__)) f = open(os.path.join(THIS_DIR, 'REPOSITORIES.inc')) srcdir = os.getcwd() repos = f.read().rstrip().split(" ") for repo in repos: config = configparser.ConfigParser() - config.read(os.path.join(THIS_DIR, "VERSIONS.inc")) + config.read(os.path.join(THIS_DIR, "VERSIONS.ini")) fromVersion = config['default']['OLD_SHA1'] toVersion = config['default']['NEW_SHA1'] os.chdir(os.path.join(srcdir, repo)) p = subprocess.Popen('git fetch', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.wait() != 0: raise NameError('git fetch failed') p = subprocess.Popen('git rev-parse ' + fromVersion + ' ' + toVersion, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.wait() != 0: raise NameError("git rev-parse failed -- correct to/from version?") p = subprocess.Popen('git log ' + fromVersion + '...' + toVersion, shell=True, stdout=subprocess.PIPE, universal_newlines=True) commit = [] commits = [] for line in p.stdout: if line.startswith("commit"): if len(commit) > 1 and not ignoreCommit: commits.append(commit) commitHash = line[7:].strip() ignoreCommit = False commit = [commitHash] elif line.startswith("Author"): pass elif line.startswith("Date"): pass elif line.startswith("Merge"): pass else: line = line.strip() if line.startswith("Merge remote-tracking branch"): ignoreCommit = True elif line.startswith("SVN_SILENT"): ignoreCommit = True elif line.startswith("GIT_SILENT"): ignoreCommit = True elif line.startswith("Merge branch"): ignoreCommit = True elif line.startswith("Update version number for"): ignoreCommit = True elif line: commit.append(line) # Add the last commit if len(commit) > 1 and not ignoreCommit: commits.append(commit) if len(commits): print("

" + repo + "

") print("\n\n") if p.wait() != 0: raise NameError('git log failed', repo, fromVersion, toVersion) diff --git a/release-scripts/update-versions.sh b/release-scripts/update-versions.sh index ef7186a5a6..261e3853a3 100755 --- a/release-scripts/update-versions.sh +++ b/release-scripts/update-versions.sh @@ -1,27 +1,25 @@ #!/bin/bash set -x -MAJOR_VERSION=5 -MINOR_VERSION=1 -PATCH_VERSION=0 -BRANCH=5.1 +# load ini file +source <(grep = VERSIONS.ini) do_replace() { local project=$1 echo $MINOR_VERSION git checkout $BRANCH sed -i -e "s/set(.*${project}_VERSION_MAJOR .*)/set(${project}_VERSION_MAJOR $MAJOR_VERSION)/g" CMakeLists.txt sed -i -e "s/set(.*${project}_VERSION_MINOR .*)/set(${project}_VERSION_MINOR $MINOR_VERSION)/g" CMakeLists.txt sed -i -e "s/set(.*${project}_VERSION_PATCH .*)/set(${project}_VERSION_PATCH $PATCH_VERSION)/g" CMakeLists.txt git diff CMakeLists.txt git commit CMakeLists.txt -m "Update version number to $MAJOR_VERSION.$MINOR_VERSION.$PATCH_VERSION" git push origin $BRANCH } (cd kdevplatform; do_replace KDEVPLATFORM) (cd kdevelop; do_replace KDEVELOP) (cd kdev-python; do_replace KDEVPYTHON) (cd kdev-php; do_replace KDEVPHP)