Commit 38e563de authored by MozLando's avatar MozLando
Browse files

Merge #7353



7353: Allow publish_to_maven_local_if_modified.py to work on Windows r=grigoryk a=mhammond
Co-authored-by: default avatarMark Hammond <mhammond@skippinet.com.au>
parents ee34a972 5d2314d0
......@@ -5,6 +5,7 @@
# Usage: ./automation/publish_to_maven_local_if_modified.py
from pathlib import Path
import sys
import os
import time
import hashlib
......@@ -105,7 +106,10 @@ if contents_hash == last_contents_hash:
print("Contents have not changed, no need to publish")
else:
print("Contents have changed, publishing")
run_cmd_checked(["./gradlew", "publishToMavenLocal", f"-Plocal={time.time_ns()}"])
if sys.platform.startswith("win"):
run_cmd_checked(["gradlew.bat", "publishToMavenLocal", f"-Plocal={time.time_ns()}"], shell=True)
else:
run_cmd_checked(["./gradlew", "publishToMavenLocal", f"-Plocal={time.time_ns()}"])
with open(LAST_CONTENTS_HASH_FILE, "w") as f:
f.write(contents_hash)
f.write("\n")
\ No newline at end of file
f.write("\n")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment