Skip to content

Commit

Permalink
Only enable build stamping for build, publish, and test
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c authored and Grigory Mischenko committed Sep 20, 2018
1 parent 143420f commit 1c05260
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions buckw
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ cmd = remainder.pop(0)

args = ["python", buck_pex, cmd]

skipped_commands = ["audit", "kill"]
stamped_commands = ["build", "publish", "test"]

if "stable" == parsed.stamp_build and cmd not in skipped_commands:
if "stable" == parsed.stamp_build and cmd in stamped_commands:
args.extend(["--config", "selenium.rev=unknown", "--config", "selenium.timestamp=unknown"])
elif "detect" == parsed.stamp_build and cmd not in skipped_commands:
elif "detect" == parsed.stamp_build and cmd in stamped_commands:
timestamp = datetime.datetime.utcnow().replace(microsecond=0).isoformat()
rev = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
args.extend(["--config", "selenium.rev=%s" % rev, "--config", "selenium.timestamp=%s" % timestamp])
Expand Down

0 comments on commit 1c05260

Please sign in to comment.