Files
signoz/replace.py
yoshino-s ea9fdddd18
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Failing after 2m23s
init
2025-05-09 13:28:52 +08:00

20 lines
555 B
Python

from sys import argv
OLD_ZEUS_URL = b"https://api.signoz.cloud"
OLD_LICENSE_URL = b"https://license.signoz.io"
NEW_ZEUS_URL = b"https://mo.yoshino-s.xyz"
NEW_LICENSE_URL = b"https://mo.yoshino-s.xyz/"
with open(argv[1], "rb") as f:
data = f.read()
assert OLD_ZEUS_URL in data, "Old Zeus URL not found in the file"
assert OLD_LICENSE_URL in data, "Old License URL not found in the file"
with open(argv[1], "wb") as f:
data = data.replace(OLD_ZEUS_URL, NEW_ZEUS_URL)
data = data.replace(OLD_LICENSE_URL, NEW_LICENSE_URL)
f.write(data)