From 3511ba5a41f65b97a42a24dc2863ea68d15dae5a Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Mon, 17 May 2021 08:49:07 +0200 Subject: [PATCH 1/3] MAINT: Introduce REVERT commit type --- COMMIT_GUIDELINES.md | 1 + scripts/commitMessage/CommitMessage.py | 2 +- scripts/generateChangelog.py | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/COMMIT_GUIDELINES.md b/COMMIT_GUIDELINES.md index 3f19780dc..755013f46 100644 --- a/COMMIT_GUIDELINES.md +++ b/COMMIT_GUIDELINES.md @@ -52,6 +52,7 @@ The `TYPE` is one of the following: | BUILD | Changes related to the build process / buildsystem | Fix cmake script | | TRANSLATION | Translation updates and changes | Update translation files | | CHANGE | Something was changed without falling into existing categories | Changed the default of a setting | +| REVERT | A previous commit had to be reverted because e.g. it was buggy | - | The `TYPE` has to be in **all-uppercase** in order for it to stand out. diff --git a/scripts/commitMessage/CommitMessage.py b/scripts/commitMessage/CommitMessage.py index 461b49b90..c0fd14a96 100644 --- a/scripts/commitMessage/CommitMessage.py +++ b/scripts/commitMessage/CommitMessage.py @@ -11,7 +11,7 @@ class CommitFormatError(Exception): Exception(msg) class CommitMessage: - knownTypes = ["BREAK", "FEAT", "FIX", "FORMAT", "DOCS", "TEST", "MAINT", "CI", "REFAC", "BUILD", "TRANSLATION", "CHANGE"] + knownTypes = ["BREAK", "FEAT", "FIX", "FORMAT", "DOCS", "TEST", "MAINT", "CI", "REFAC", "BUILD", "TRANSLATION", "CHANGE", "REVERT"] def __init__(self, commitString): lines = commitString.strip().split("\n") diff --git a/scripts/generateChangelog.py b/scripts/generateChangelog.py index b26c971d9..2bcaa13f4 100755 --- a/scripts/generateChangelog.py +++ b/scripts/generateChangelog.py @@ -94,6 +94,8 @@ def main(): prefix = "Fixed: " elif "CHANGE" in commit.m_types: prefix = "Changed: " + elif "REVERT" in commit.m_types: + prefix = "Reverted: " else: prefix = "Unknown: " From 0d71b84ec74863154da390ae130af52d6952d876 Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Mon, 17 May 2021 08:49:39 +0200 Subject: [PATCH 2/3] REVERT: "BUILD(macos): Fix hdiutil error during dmg packaging" This reverts commit 0b75cd6f8a25f015857525392e746949b680c99c. --- macx/scripts/osxdist.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/macx/scripts/osxdist.py b/macx/scripts/osxdist.py index 2697079c3..dab35ad4b 100755 --- a/macx/scripts/osxdist.py +++ b/macx/scripts/osxdist.py @@ -248,32 +248,14 @@ class DiskImage(FolderObject): Create the disk image itself. ''' print ' * Creating diskimage. Please wait...' - if not self.filename.endswith(".dmg"): - self.filename += ".dmg" if os.path.exists(self.filename): os.remove(self.filename) - # First create an intermediate, uncompressed image. We do this as otherwise it often happens that - # hdiutils fails with the message "no space left on device" which doesn't seem to appear without compression - intermediateName = self.filename.replace(".dmg", "_intermediate.dmg") p = Popen(['hdiutil', 'create', '-srcfolder', self.tmp, - '-format', 'UDRW', - '-volname', self.volname, - '-verbose', - intermediateName]) - retval = p.wait() - if retval != 0: - raise Exception("Creating intermediate dmg file failed") - - # Now take that intermediate and compress it - p = Popen(['hdiutil', 'convert', - intermediateName, '-format', 'UDBZ', - '-verbose', '-o', + '-volname', self.volname, self.filename]) retval = p.wait() - if retval != 0: - raise Exception("Compressing dmg file failed") print ' * Removing temporary directory.' shutil.rmtree(self.tmp) print ' * Done!' From 57095b004596b6288bf2f7f67367b25b27a6e9fd Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Mon, 17 May 2021 08:50:47 +0200 Subject: [PATCH 3/3] BUILD(macos): Fix package script failing We were seeing errors like could not access /Volumes/Mumble 1.4.0~2021-05-16~g789f2d79e~snapshot/Mumble.app/Contents/MacOS/Mumble - No space left on device hdiutil: create failed - No space left on device every now and then when attempting to package the DMG package for macOS. Following the trick described at https://apple.stackexchange.com/a/177071/417917, we now add the -megabytes option to the call which seems to fix the issue somehow. --- macx/scripts/osxdist.py | 1 + 1 file changed, 1 insertion(+) diff --git a/macx/scripts/osxdist.py b/macx/scripts/osxdist.py index dab35ad4b..39558c37d 100755 --- a/macx/scripts/osxdist.py +++ b/macx/scripts/osxdist.py @@ -254,6 +254,7 @@ class DiskImage(FolderObject): '-srcfolder', self.tmp, '-format', 'UDBZ', '-volname', self.volname, + '-megabytes', '130', self.filename]) retval = p.wait() print ' * Removing temporary directory.'