Merge remote-tracking branch 'upstream/master' into ed-27-09-2024-upstream
# Conflicts: # Content.Server/Explosion/EntitySystems/TriggerSystem.cs
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
This is a template that greatly simplifies working with IconSmooth sprites.
|
||||
|
||||
A video on how to use it can be found at the link:
|
||||
https://github.com/space-wizards/space-station-14/pull/32210
|
||||
BIN
Tools/SS14 Aseprite Templates/IconSmoothingTemplate.aseprite
Normal file
BIN
Tools/SS14 Aseprite Templates/IconSmoothingTemplate.aseprite
Normal file
Binary file not shown.
78
Tools/publish_multi_request.py
Executable file
78
Tools/publish_multi_request.py
Executable file
@@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import os
|
||||
import subprocess
|
||||
from typing import Iterable
|
||||
|
||||
PUBLISH_TOKEN = os.environ["PUBLISH_TOKEN"]
|
||||
VERSION = os.environ["GITHUB_SHA"]
|
||||
|
||||
RELEASE_DIR = "release"
|
||||
|
||||
#
|
||||
# CONFIGURATION PARAMETERS
|
||||
# Forks should change these to publish to their own infrastructure.
|
||||
#
|
||||
ROBUST_CDN_URL = "https://wizards.cdn.spacestation14.com/"
|
||||
FORK_ID = "wizards"
|
||||
|
||||
def main():
|
||||
session = requests.Session()
|
||||
session.headers = {
|
||||
"Authorization": f"Bearer {PUBLISH_TOKEN}",
|
||||
}
|
||||
|
||||
print(f"Starting publish on Robust.Cdn for version {VERSION}")
|
||||
|
||||
data = {
|
||||
"version": VERSION,
|
||||
"engineVersion": get_engine_version(),
|
||||
}
|
||||
headers = {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
resp = session.post(f"{ROBUST_CDN_URL}fork/{FORK_ID}/publish/start", json=data, headers=headers)
|
||||
resp.raise_for_status()
|
||||
print("Publish successfully started, adding files...")
|
||||
|
||||
for file in get_files_to_publish():
|
||||
print(f"Publishing {file}")
|
||||
with open(file, "rb") as f:
|
||||
headers = {
|
||||
"Content-Type": "application/octet-stream",
|
||||
"Robust-Cdn-Publish-File": os.path.basename(file),
|
||||
"Robust-Cdn-Publish-Version": VERSION
|
||||
}
|
||||
resp = session.post(f"{ROBUST_CDN_URL}fork/{FORK_ID}/publish/file", data=f, headers=headers)
|
||||
|
||||
resp.raise_for_status()
|
||||
|
||||
print("Successfully pushed files, finishing publish...")
|
||||
|
||||
data = {
|
||||
"version": VERSION
|
||||
}
|
||||
headers = {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
resp = session.post(f"{ROBUST_CDN_URL}fork/{FORK_ID}/publish/finish", json=data, headers=headers)
|
||||
resp.raise_for_status()
|
||||
|
||||
print("SUCCESS!")
|
||||
|
||||
|
||||
def get_files_to_publish() -> Iterable[str]:
|
||||
for file in os.listdir(RELEASE_DIR):
|
||||
yield os.path.join(RELEASE_DIR, file)
|
||||
|
||||
|
||||
def get_engine_version() -> str:
|
||||
proc = subprocess.run(["git", "describe","--tags", "--abbrev=0"], stdout=subprocess.PIPE, cwd="RobustToolbox", check=True, encoding="UTF-8")
|
||||
tag = proc.stdout.strip()
|
||||
assert tag.startswith("v")
|
||||
return tag[1:] # Cut off v prefix.
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user