Skip to content
Snippets Groups Projects
Verified Commit ffc5f9d0 authored by David Hoese's avatar David Hoese
Browse files

Add config handling for metobs versus metobs-test

parent 84717cb9
Branches
No related tags found
No related merge requests found
......@@ -11,6 +11,14 @@ elif [[ "${os_kind}" == "centos" ]]; then
source ~/.bashrc
fi
if [[ -z "$METOBS_SITE_DEST" ]]; then
if [[ "$CI_COMMIT_BRANCH" == "develop" ]]; then
METOBS_SITE_DEST="metobs-test"
else
METOBS_SITE_DEST="metobs"
fi
fi
# create or update the existing environment to the newest pelican version
conda env update -p "${PWD}/rain_site_env" -f "${SCRIPT_DIR}/build_environment.yml"
conda activate "${PWD}/rain_site_env"
......
......@@ -6,8 +6,7 @@ sys.path.append(os.curdir)
from pelicanconf import * # noqa
JS_CONF_VARS = {
# FIXME: Figure out how to make this `metobs` on master, `metobs-test` on develop
'METOBS_API_URL': 'https://metobs-test.ssec.wisc.edu',
'METOBS_API_URL': 'https://metobs.ssec.wisc.edu',
'QUICKLOOKS_FORMAT': 'new',
}
......@@ -23,4 +22,12 @@ DELETE_OUTPUT_DIRECTORY = True
# Following items are often useful when publishing
#DISQUS_SITENAME = ""
#GOOGLE_ANALYTICS = ""
\ No newline at end of file
#GOOGLE_ANALYTICS = ""
# Handle things differently if we are on metobs-test versus metobs
is_test_site = os.environ.get('METOBS_SITE_DEST', 'metobs') == 'metobs-test'
if is_test_site:
JS_CONF_VARS['METOBS_API_URL'] = 'https://metobs-test.ssec.wisc.edu'
SITEURL = 'https://metobs-test.ssec.wisc.edu'
print("Rendering site for base URL: {}".format(SITEURL))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment