Skip to content

Commit

Permalink
Hook the data model into the process-exec infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Jul 6, 2024
1 parent fa8c014 commit 9144bb3
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 DiffPlug
* Copyright (C) 2019-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -247,6 +247,17 @@ public void push() throws IOException, GitAPIException {
GitActions git = data.gitCfg.withChangelog(data.changelogFile, data.model());
git.addAndCommit();
git.tagBranchPush();
if (data.gitCfg.runAfterPush != null) {
try (var runner = new ProcessRunner()) {
var result = runner.shell(data.gitCfg.runAfterPush);
System.out.write(result.stdOut());
System.out.flush();
System.err.write(result.stdErr());
System.err.flush();
} catch (IOException | InterruptedException e) {
throw new GradleException("runAfterPush failed: " + data.gitCfg.runAfterPush, e);
}
}
}
}
}

0 comments on commit 9144bb3

Please sign in to comment.