diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2018-04-18 23:42:09 +0200 |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2018-04-18 23:44:52 +0200 |
commit | 0b9ed3d29b4f349567d5c8170c646e44f5d24c58 (patch) | |
tree | 2cdb11b92a00dabf6e0bb4e10532165501ce4e96 | |
parent | Remove obsolete comment (diff) | |
download | tatt-0b9ed3d29b4f349567d5c8170c646e44f5d24c58.tar.gz tatt-0b9ed3d29b4f349567d5c8170c646e44f5d24c58.tar.bz2 tatt-0b9ed3d29b4f349567d5c8170c646e44f5d24c58.zip |
fix running without bug number given
-rw-r--r-- | tatt/scriptwriter.py | 3 | ||||
-rw-r--r-- | templates/commit-header | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index 69449c1..5da4f67 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -30,7 +30,8 @@ def scriptTemplate(job, config, filename): snippet = snippetfile.read() snippet = snippet.replace("@@EMERGEOPTS@@", config['emergeopts']) - snippet = snippet.replace("@@BUG@@", job.bugnumber) + if job.bugnumber: + snippet = snippet.replace("@@BUG@@", job.bugnumber) snippet = snippet.replace("@@JOB@@", job.name) snippet = snippet.replace("@@ARCH@@", config['arch']) snippet = snippet.replace("@@REPODIR@@", config['repodir']) diff --git a/templates/commit-header b/templates/commit-header index 0b7a343..5b99e7a 100644 --- a/templates/commit-header +++ b/templates/commit-header @@ -2,7 +2,11 @@ pushd @@REPODIR@@ > /dev/null if [ "@@NEWKEYWORD@@" = "@@ARCH@@" ]; then - DESCR="@@ARCH@@ stable (bug #@@BUG@@)" + DESCR="@@ARCH@@ stable" else - DESCR="@@ARCH@@ keyworded (bug #@@BUG@@)" + DESCR="@@ARCH@@ keyworded" +fi + +if [ -n "@@BUG@@" ]; then + DESCR="${DESCR} (bug #@@BUG@@)" fi |