[recipes] Add --tags to git fetch command This ensures that `git describe` will work. Change-Id: Ie4baef261d0fba2913d08d2bd193f4a1f7e43985 Reviewed-on: https://gn-review.googlesource.com/2021 Reviewed-by: Scott Graham <scottmg@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
diff --git a/infra/recipes/gn.expected/ci.json b/infra/recipes/gn.expected/ci.json index 8556002..e2e8933 100644 --- a/infra/recipes/gn.expected/ci.json +++ b/infra/recipes/gn.expected/ci.json
@@ -19,6 +19,7 @@ "cmd": [ "git", "fetch", + "--tags", "https://gn.googlesource.com/gn", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ],
diff --git a/infra/recipes/gn.expected/cipd_exists.json b/infra/recipes/gn.expected/cipd_exists.json index 8dfe0f6..5a7f14a 100644 --- a/infra/recipes/gn.expected/cipd_exists.json +++ b/infra/recipes/gn.expected/cipd_exists.json
@@ -19,6 +19,7 @@ "cmd": [ "git", "fetch", + "--tags", "https://gn.googlesource.com/gn", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ],
diff --git a/infra/recipes/gn.expected/cipd_register.json b/infra/recipes/gn.expected/cipd_register.json index ffdcfa5..5a31ae9 100644 --- a/infra/recipes/gn.expected/cipd_register.json +++ b/infra/recipes/gn.expected/cipd_register.json
@@ -19,6 +19,7 @@ "cmd": [ "git", "fetch", + "--tags", "https://gn.googlesource.com/gn", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ],
diff --git a/infra/recipes/gn.expected/cq.json b/infra/recipes/gn.expected/cq.json index 71cb320..e9b8b25 100644 --- a/infra/recipes/gn.expected/cq.json +++ b/infra/recipes/gn.expected/cq.json
@@ -19,6 +19,7 @@ "cmd": [ "git", "fetch", + "--tags", "https://gn.googlesource.com/gn", "refs/heads/master" ],
diff --git a/infra/recipes/gn.py b/infra/recipes/gn.py index df9d6e2..0a88862 100644 --- a/infra/recipes/gn.py +++ b/infra/recipes/gn.py
@@ -36,7 +36,8 @@ ref = ( build_input.gitiles_commit.id if build_input.gitiles_commit else 'refs/heads/master') - api.step('fetch', ['git', 'fetch', repository, ref]) + # Fetch tags so `git describe` works. + api.step('fetch', ['git', 'fetch', '--tags', repository, ref]) api.step('checkout', ['git', 'checkout', 'FETCH_HEAD']) for change in build_input.gerrit_changes: api.step('fetch %s/%s' % (change.change, change.patchset), [