Skip to content

Commit

Permalink
Fix the package name in the apihelp of the simple app
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Apr 13, 2023
1 parent 0816d48 commit 14c86f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ADMIN_SRC_FILES = $(shell ls -1 commons/c2cgeoportal_commons/models/*.py 2> /dev

APPS += desktop mobile iframe_api
STATIC_PATH = geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/geoportal/{{cookiecutter.package}}_geoportal/static
ADVANCE_STATIC_PATH = geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/{{cookiecutter.package}}_geoportal/static
APPS_PACKAGE_PATH = geoportal/c2cgeoportal_geoportal/scaffolds/advance_create/{{cookiecutter.project}}/geoportal/{{cookiecutter.package}}_geoportal
APPS_HTML_FILES = $(addprefix $(APPS_PACKAGE_PATH)/static-ngeo/js/apps/, $(addsuffix .html.ejs, $(APPS)))
APPS_JS_FILES = $(addprefix $(APPS_PACKAGE_PATH)/static-ngeo/js/apps/Controller, $(addsuffix .js, $(APPS)))
Expand All @@ -30,7 +31,7 @@ APPS_SASS_FILES_ALT += $(addprefix $(APPS_PACKAGE_PATH_ALT)/static-ngeo/js/apps/
APPS_SASS_FILES_ALT += $(addprefix $(APPS_PACKAGE_PATH_ALT)/static-ngeo/js/apps/sass/vars_, $(addsuffix .scss, $(APPS_ALT)))
APPS_FILES_ALT = $(APPS_HTML_FILES_ALT) $(APPS_JS_FILES_ALT) $(APPS_SASS_FILES_ALT)

API_FILES = $(APPS_PACKAGE_PATH)/static-ngeo/api/api.css $(STATIC_PATH)/apihelp
API_FILES = $(APPS_PACKAGE_PATH)/static-ngeo/api/api.css $(STATIC_PATH)/apihelp $(ADVANCE_STATIC_PATH)/apihelp

include dependencies.mk

Expand Down Expand Up @@ -116,7 +117,7 @@ $(STATIC_PATH)/apihelp: /usr/lib/node_modules/ngeo/api/dist/apihelp
cp -r $< $@
mv $@/apihelp.html $@/index.html.tmpl
sed -i -e 's#https://geomapfish-demo-2-[0-9].camptocamp.com/#$${VISIBLE_WEB_PROTOCOL}://$${VISIBLE_WEB_HOST}$${VISIBLE_ENTRY_POINT}#g' $@/index.html.tmpl
sed -i -e 's# = new demo.Map# = new {{cookiecutter.package}}.Map#g' $@/index.html.tmpl
sed -i -e 's# = new demo.Map# = new geomapfishapp.Map#g' $@/index.html.tmpl
sed -i -e 's#\.\./api\.js#../api.js?version=2#g' $@/index.html.tmpl
sed -i -e 's#github\.css#../static/$${CACHE_VERSION}/apihelp/github.css#g' $@/index.html.tmpl
sed -i -e 's#rainbow-custom\.min\.js#../static/$${CACHE_VERSION}/apihelp/rainbow-custom.min.js#g' $@/index.html.tmpl
Expand All @@ -125,12 +126,18 @@ $(STATIC_PATH)/apihelp: /usr/lib/node_modules/ngeo/api/dist/apihelp
sed -i -e 's#img/#../static/$${CACHE_VERSION}/apihelp/img/#g' $@/index.html.tmpl
sed -i -e "s#https://geomapfish-demo-2-[0-9].camptocamp.com/0/img/markers/#../static/0/images/markers/#g" $@/data.txt

$(ADVANCE_STATIC_PATH)/apihelp: $(STATIC_PATH)/apihelp
rm --recursive --force $@
mkdir -p $@
cp $</index.html.tmpl $@/index.html.tmpl
sed -i -e 's# = new geomapfishapp.Map# = new {{cookiecutter.package}}.Map#g' $@/index.html.tmpl

.PRECIOUS: geoportal/c2cgeoportal_geoportal/scaffolds%update/{{cookiecutter.project}}/CONST_create_template/
geoportal/c2cgeoportal_geoportal/scaffolds%update/{{cookiecutter.project}}/CONST_create_template/: \
geoportal/c2cgeoportal_geoportal/scaffolds%create/{{cookiecutter.project}}/ \
$(addprefix geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/geoportal/{{cookiecutter.package}}_geoportal/locale/,$(addsuffix /LC_MESSAGES/{{cookiecutter.package}}_geoportal-client.po, $(ALL_LANGUAGES))) \
$(STATIC_PATH)/header.html \
$(STATIC_PATH)/apihelp
$(API_FILES)
rm -rf $@ || true
cp -r $< $@

Expand Down
2 changes: 1 addition & 1 deletion ci/test-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function upgrade {
exit 1
fi
git clean -Xf
find . -type d -empty -delete
find . -type d -empty -delete || true

cd -
diff --recursive --exclude=.git --exclude=locale "${WORKSPACE}/ref" "${WORKSPACE}/v$1"
Expand Down

0 comments on commit 14c86f4

Please sign in to comment.