diff --git a/release-scripts/REPOSITORIES.inc b/release-scripts/REPOSITORIES.inc new file mode 100644 index 0000000000..21df10be2c --- /dev/null +++ b/release-scripts/REPOSITORIES.inc @@ -0,0 +1 @@ +kdevplatform kdevelop kdev-python kdev-php diff --git a/release-scripts/VERSIONS.inc b/release-scripts/VERSIONS.inc new file mode 100644 index 0000000000..509ab402cb --- /dev/null +++ b/release-scripts/VERSIONS.inc @@ -0,0 +1,8 @@ +[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 new file mode 100755 index 0000000000..ce75bf8689 --- /dev/null +++ b/release-scripts/create_log.py @@ -0,0 +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")) + 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)