Skip to content

Commit

Permalink
parsable tracing of steps
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jolla.com>
  • Loading branch information
Denis Zalevskiy committed Oct 25, 2014
1 parent c0d4f7d commit ee82149
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/git-vault-rebase-generate.awk
Expand Up @@ -22,14 +22,14 @@ function push_command(cmd) {
push(commands, length(commands), cmd);
}

function push_echo(message) {
push_command("echo 'STEP: " message "'");
function push_step(message) {
push_command("echo 'STEP:" message "'");
}

function prepare_commands() {
for (name in commits) {
split(commits[name], ids, SUBSEP);
push_echo("data " name);
push_step("data:" name);
if (length(ids) == 1) {
push_command("git cherry-pick " ids[1]);
} else {
Expand All @@ -47,15 +47,15 @@ function prepare_commands() {
id = $2
tag = $3
if (length(old_tags) != 0) {
push_echo("squash " tag " with " length(old_tags) " old tags");
push_step("squash:" tag " with " length(old_tags) " old tags");
for (i = 1; i <= length(old_tags); i++) {
push_command(old_tags[i]);
}
array_clear(old_tags);
push_command("git cherry-pick --no-commit " id);
push_command("git commit --no-edit --amend --allow-empty");
} else {
push_echo("tag " tag);
push_step("tag:" tag);
push_command("git cherry-pick " id);
}
tmp_tag = "migrate/" tag
Expand All @@ -74,7 +74,7 @@ $1 == "add" {
}

$1 == "old_tag" {
push_echo("old_tag " $3);
push_step("old_tag:" $3);
if (length(old_tags) == 0) {
push(old_tags, length(old_tags), "git cherry-pick " $2);
} else {
Expand All @@ -88,7 +88,7 @@ $1 == "tag" {
}

$1 == "copy" {
push_echo("copy " $2);
push_step("copy:" $2);
push_command("git cherry-pick " $2);
}

Expand Down

0 comments on commit ee82149

Please sign in to comment.