mirror of
https://github.com/Dvorinka/excalidraw-full.git
synced 2026-06-04 22:32:55 +00:00
fix: convert cf-kv and excalidraw-libraries from submodules to regular files
- Remove stale cloudflare-worker submodule entry from .gitmodules - Remove .git dirs from cf-kv and excalidraw-libraries so Git tracks them as regular files - Fixes 'No url found for submodule path cf-kv' CI error
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
ROOT_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||
TEMPLATE_FILE = os.path.join(ROOT_DIR, "excalidraw.json")
|
||||
KEY_FILE = os.path.join(ROOT_DIR, "excalidraw-key.json")
|
||||
|
||||
|
||||
def main():
|
||||
if os.environ.get("ANALYTICS_PRIVATE_KEY") and os.environ.get(
|
||||
"ANALYTICS_PRIVATE_KEY_ID"
|
||||
):
|
||||
with open(TEMPLATE_FILE, "r") as template:
|
||||
data = json.load(template)
|
||||
|
||||
data["private_key"] = os.environ.get("ANALYTICS_PRIVATE_KEY").replace(
|
||||
"\\n", "\n"
|
||||
)
|
||||
data["private_key_id"] = os.environ.get("ANALYTICS_PRIVATE_KEY_ID").replace(
|
||||
"\\n", "\n"
|
||||
)
|
||||
|
||||
with open(KEY_FILE, "w") as key:
|
||||
json.dump(data, key, indent=2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user