summaryrefslogtreecommitdiff
path: root/subplot/bumper.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-30 09:11:48 +0000
committerLars Wirzenius <liw@liw.fi>2021-03-30 09:11:48 +0000
commit2a10fbddbc7da6a4e38818896e2961a7c5d8991d (patch)
tree53e4d3dee34886241edef578d5a254f041a19e71 /subplot/bumper.py
parente139b4f8f89ebc718947542949f891415c423ef7 (diff)
parentd4c0918adbf8d1b88393df3763845cec1767e67b (diff)
downloadbumper-rs-2a10fbddbc7da6a4e38818896e2961a7c5d8991d.tar.gz
Merge branch 'debian' into 'main'
Add Debian packaging See merge request larswirzenius/bumper!1
Diffstat (limited to 'subplot/bumper.py')
-rw-r--r--subplot/bumper.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/subplot/bumper.py b/subplot/bumper.py
index 3198e13..329173c 100644
--- a/subplot/bumper.py
+++ b/subplot/bumper.py
@@ -13,15 +13,36 @@ def install_bumper(ctx):
def git_init_and_commit_everything(ctx, dirname=None):
runcmd_run = globals()["runcmd_run"]
+ runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
+
+ runcmd_run(
+ ctx, ["git", "config", "--global", "user.email", "me@example.com", dirname]
+ )
+ runcmd_exit_code_is_zero(ctx)
+
+ runcmd_run(
+ ctx, ["git", "config", "--global", "user.name", "J. Random Hacker", dirname]
+ )
+ runcmd_exit_code_is_zero(ctx)
+
runcmd_run(ctx, ["git", "init", dirname])
+ runcmd_exit_code_is_zero(ctx)
+
runcmd_run(ctx, ["git", "add", "."], cwd=dirname)
+ runcmd_exit_code_is_zero(ctx)
+
runcmd_run(ctx, ["git", "commit", "-minitial"], cwd=dirname)
+ runcmd_exit_code_is_zero(ctx)
def remember_HEAD(ctx, dirname=None, varname=None):
runcmd_run = globals()["runcmd_run"]
runcmd_get_stdout = globals()["runcmd_get_stdout"]
+
runcmd_run(ctx, ["git", "rev-parse", "HEAD"], cwd=dirname)
+ runcmd_exit_code_is_zero = globals()["runcmd_exit_code_is_zero"]
+ runcmd_exit_code_is_zero(ctx)
+
ctx[varname] = runcmd_get_stdout(ctx).strip()