Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
Version bumps are now pushed to the repo
Browse files Browse the repository at this point in the history
Ensured that version bump runs before git push task
  • Loading branch information
mockitoguy committed May 14, 2017
1 parent 7362324 commit fbc019a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,20 @@ public void run() {
}
});

//commit task that is added by GitPlugin needs to run after the add bump version task added by AutoVersioningPlugin
//TODO: let's think about a way to avoid 'git add' tasks completely.
// We can use git commit with paths to commit specific files without the need for 'add' operation
// Using 'git add' adds complexity and causes weird bugs like #145
project.getTasks().getByName(GitPlugin.COMMIT_TASK).mustRunAfter(AutoVersioningPlugin.ADD_BUMP_VERSION_TASK);

TaskMaker.task(project, "performRelease", new Action<Task>() {
public void execute(final Task t) {
t.setDescription("Performs release. " +
"Ship with: './gradlew performRelease -Preleasing.dryRun=false'. " +
"Test with: './gradlew testRelease'");

t.dependsOn(VersioningPlugin.BUMP_VERSION_FILE_TASK, "updateReleaseNotes", "updateNotableReleaseNotes");
t.dependsOn("gitAddBumpVersion", "gitAddReleaseNotes", GitPlugin.COMMIT_TASK, GitPlugin.TAG_TASK);
t.dependsOn(AutoVersioningPlugin.ADD_BUMP_VERSION_TASK, "gitAddReleaseNotes", GitPlugin.COMMIT_TASK, GitPlugin.TAG_TASK);
t.dependsOn(GitPlugin.PUSH_TASK);
t.dependsOn("bintrayUploadAll");

Expand Down

0 comments on commit fbc019a

Please sign in to comment.