~cjwatson/launchpad-buildd/rename-slave-prep

« back to all changes in this revision

Viewing changes to lpbuildd/target/build_snap.py

  • Committer: Colin Watson
  • Date: 2018-06-05 02:08:12 UTC
  • mfrom: (327.3.2 git-path-tags)
  • Revision ID: cjwatson@canonical.com-20180605020812-mm16ta8j42gkssa8
[r=wgrant] Allow checking out a git tag rather than a branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
                self.args.git_path
151
151
                if self.args.git_path is not None else "HEAD")
152
152
            status["revision_id"] = self.run_build_command(
153
 
                ["git", "rev-parse", rev],
 
153
                # The ^{} suffix copes with tags: we want to peel them
 
154
                # recursively until we get an actual commit.
 
155
                ["git", "rev-parse", rev + "^{}"],
154
156
                cwd=os.path.join("/build", self.args.name),
155
157
                get_output=True).rstrip("\n")
156
158
        self.save_status(status)