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("
")
print("")
for commit in commits:
extra = ""
changelog = commit[1]
for line in commit:
line = cgi.escape(line)
if line.startswith("BUGS:"):
bugNumbers = line[line.find(":") + 1:].strip()
for bugNumber in bugNumbers.split(","):
if bugNumber.isdigit():
if extra:
extra += ". "
extra += "Fixes bug #" + bugNumber + ""
elif line.startswith("BUG:"):
bugNumber = line[line.find(":") + 1:].strip()
if bugNumber.isdigit():
if extra:
extra += ". "
extra += "Fixes bug #" + bugNumber + ""
elif line.startswith("REVIEW:"):
if extra:
extra += ". "
reviewNumber = line[line.find(":") + 1:].strip()
extra += "Code review #" + reviewNumber + ""
# jr addition 2017-02 phab link
elif line.startswith("Differential Revision:"):
if extra:
extra += ". "
reviewNumber = line[line.find("org/") + 4:].strip()
extra += "Phabricator Code review " + reviewNumber + ""
elif line.startswith("CCBUG:"):
if extra:
extra += ". "
bugNumber = line[line.find(":") + 1:].strip()
extra += "See bug #" + bugNumber + ""
elif line.startswith("FEATURE:"):
feature = line[line.find(":") + 1:].strip()
if feature.isdigit():
if extra:
extra += ". "
extra += "Implements feature #" + feature + ""
else:
if feature:
changelog = feature
elif line.startswith("CHANGELOG:"):
changelog = line[11:] # remove word "CHANGELOG: "
elif line.startswith("Merge Plasma"):
pass
commitHash = commit[0]
if not changelog.endswith("."):
changelog = changelog + "."
# NOTE: Only showing interesting changes
if extra:
capitalizedChangelog = changelog[0].capitalize() + changelog[1:]
print("- " + capitalizedChangelog + " Commit. " + extra + "
")
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)