mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
provision: Compute ZULIP_PATH dynamically.
This commit is contained in:
10
provision.py
10
provision.py
@@ -46,18 +46,14 @@ APT_DEPENDENCIES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VENV_PATH = "/srv/zulip-venv"
|
VENV_PATH = "/srv/zulip-venv"
|
||||||
ZULIP_PATH = "/srv/zulip"
|
ZULIP_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(os.path.dirname(__file__), ".git")):
|
if not os.path.exists(os.path.join(ZULIP_PATH, ".git")):
|
||||||
print("Error: No Zulip git repository present at /srv/zulip!")
|
print("Error: No Zulip git repository present!")
|
||||||
print("To setup the Zulip development environment, you should clone the code")
|
print("To setup the Zulip development environment, you should clone the code")
|
||||||
print("from GitHub, rather than using a Zulip production release tarball.")
|
print("from GitHub, rather than using a Zulip production release tarball.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# TODO: Parse arguments properly
|
|
||||||
if "--travis" in sys.argv or "--docker" in sys.argv:
|
|
||||||
ZULIP_PATH = "."
|
|
||||||
|
|
||||||
# tsearch-extras is an extension to postgres's built-in full-text search.
|
# tsearch-extras is an extension to postgres's built-in full-text search.
|
||||||
# TODO: use a real APT repository
|
# TODO: use a real APT repository
|
||||||
TSEARCH_URL_PATTERN = "https://github.com/zulip/zulip-dist-tsearch-extras/raw/master/{}_{}_{}.deb?raw=1"
|
TSEARCH_URL_PATTERN = "https://github.com/zulip/zulip-dist-tsearch-extras/raw/master/{}_{}_{}.deb?raw=1"
|
||||||
|
|||||||
Reference in New Issue
Block a user