mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
We are starting the cutover process and starlight_help is the directory we have agreed on to place our new help center project. We do not want to use `starlight_help` as the URL for the project, but this commit changes the url from `help-beta` to `starlight_help` temporarily since we can only change URL once we get rid of the current help center project. That will be done in a future commit.
46 lines
1.1 KiB
Python
Executable File
46 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import argparse
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
from email.utils import parseaddr
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
|
|
|
from scripts.lib.setup_path import setup_path
|
|
|
|
setup_path()
|
|
|
|
os.environ["DJANGO_SETTINGS_MODULE"] = "zproject.settings"
|
|
|
|
import django
|
|
|
|
django.setup()
|
|
from django.conf import settings
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument(
|
|
"--no-relative-links",
|
|
action="store_false",
|
|
dest="show_relative_links",
|
|
help="Disable relative links when using NavigationSteps component. Typically only set to true in case of the help center being hosted on zulip.com.",
|
|
)
|
|
args = parser.parse_args()
|
|
|
|
|
|
def run() -> None:
|
|
subprocess.check_call(["./tools/convert-help-center-docs-to-mdx"])
|
|
env = os.environ.copy()
|
|
env["SUPPORT_EMAIL"] = parseaddr(settings.ZULIP_ADMINISTRATOR)[1]
|
|
env["CORPORATE_ENABLED"] = str(settings.CORPORATE_ENABLED).lower()
|
|
env["SHOW_RELATIVE_LINKS"] = str(args.show_relative_links).lower()
|
|
subprocess.check_call(
|
|
["/usr/local/bin/corepack", "pnpm", "build"],
|
|
cwd="starlight_help",
|
|
env=env,
|
|
)
|
|
|
|
|
|
run()
|