Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
enables use of T_ORIENTATION for pwa release
  • Loading branch information
chrisekelley committed Jun 3, 2019
1 parent ad13115 commit b836f10
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,7 +4,8 @@
- Experimental features
- Two-way Sync. See `docs/feature-two-way-sync.md`.
- Clientside search of Forms for Case Management Groups. See `docs/case-management-group.md`.
- incremented tangy-form to 3.15.0, tangy-form-editor to 5.16.0
- incremented tangy-form to 3.15.0, tangy-form-editor to 5.16.0 to fix [Editing form level HTML requires two Save clicks](https://github.com/Tangerine-Community/Tangerine/issues/1041) and [Add a tangy input inside a tangy box duplicates items](https://github.com/Tangerine-Community/Tangerine/issues/1364)
- enables [use of T_ORIENTATION for pwa release](https://github.com/Tangerine-Community/Tangerine/issues/1530).

Upgrade instructions:

Expand Down
2 changes: 1 addition & 1 deletion client/pwa-tools/updater-app/manifest.json
Expand Up @@ -27,5 +27,5 @@
"type": "image/png"
}
],
"orientation": "portrait"
"orientation": "T_ORIENTATION"
}
1 change: 1 addition & 0 deletions config.defaults.sh
Expand Up @@ -51,5 +51,6 @@ T_TAG=""
# Enable use of a remote CouchDB
T_COUCHDB_ENDPOINT="http://$T_COUCHDB_USER_ADMIN_NAME:$T_COUCHDB_USER_ADMIN_PASS@couchdb:5984/"
T_COUCHDB_LOCAL="true"
T_ORIENTATION="landscape"


1 change: 1 addition & 0 deletions develop.sh
Expand Up @@ -134,6 +134,7 @@ CMD="docker run -it --name $T_CONTAINER_NAME \
--env \"T_REGISTRATION_REQUIRES_SERVER_USER=$T_REGISTRATION_REQUIRES_SERVER_USER\" \
--env \"T_CENTRALLY_MANAGED_USER_PROFILE=$T_CENTRALLY_MANAGED_USER_PROFILE\" \
--env \"T_CATEGORIES=$T_CATEGORIES\" \
--env \"T_ORIENTATION=$T_ORIENTATION\" \
$T_PORT_MAPPING \
-p 9229:9229 \
-p 9228:9228 \
Expand Down
2 changes: 2 additions & 0 deletions editor-develop.sh
Expand Up @@ -136,6 +136,8 @@ CMD="docker run -it --name $T_CONTAINER_NAME \
--env \"T_REGISTRATION_REQUIRES_SERVER_USER=$T_REGISTRATION_REQUIRES_SERVER_USER\" \
--env \"T_CENTRALLY_MANAGED_USER_PROFILE=$T_CENTRALLY_MANAGED_USER_PROFILE\" \
--env \"T_CATEGORIES=$T_CATEGORIES\" \
--env \"T_ORIENTATION=$T_ORIENTATION\" \
$T_PORT_MAPPING \
-p 9229:9229 \
-p 9228:9228 \
Expand Down
17 changes: 17 additions & 0 deletions server/src/scripts/release-pwa.sh
Expand Up @@ -27,6 +27,16 @@ fi

cd /tangerine/client

if [ -z "$T_ORIENTATION" ]
then
echo "releasing in the default orientation."
sed -i -e "s#T_ORIENTATION#portrait" builds/pwa/manifest.json
else
echo "releasing in the configured orientation: $T_ORIENTATION."
# modify the orientation per configuration settings
sed -i -e "s#T_ORIENTATION#"$T_ORIENTATION"#g" builds/pwa/manifest.json
fi

# Create a temporary PWA folder that we'll move to the secret.
cp -r builds/pwa pwa-tools/service-worker-generator/.pwa-temporary
cd pwa-tools/service-worker-generator
Expand All @@ -42,6 +52,13 @@ cp -r $CONTENT_PATH .pwa-temporary/$UUID/app/assets
# Add logo.
cp .pwa-temporary/logo.svg .pwa-temporary/$UUID/

#if [ ! -z "$T_ORIENTATION" ]
#then
# echo "releasing in the configured orientation: $T_ORIENTATION."
## modify the orientation per configuration settings
# sed -i -e "s#orientation#"$T_ORIENTATION"#g" pwa-tools/service-worker-generator/.pwa-temporary/manifest.json
#fi

# Generate service worker.
./node_modules/.bin/workbox generate:sw

Expand Down
2 changes: 2 additions & 0 deletions start.sh
Expand Up @@ -105,6 +105,8 @@ RUN_OPTIONS="
--env \"T_LEGACY=$T_LEGACY\" \
--env \"T_REGISTRATION_REQUIRES_SERVER_USER=$T_REGISTRATION_REQUIRES_SERVER_USER\" \
--env \"T_CENTRALLY_MANAGED_USER_PROFILE=$T_CENTRALLY_MANAGED_USER_PROFILE\" \
--env \"T_ORIENTATION=$T_ORIENTATION\" \
$T_PORT_MAPPING \
--volume $(pwd)/data/dat-output:/dat-output/ \
--volume $(pwd)/data/reporting-worker-state.json:/reporting-worker-state.json \
Expand Down
2 changes: 2 additions & 0 deletions test.sh
Expand Up @@ -136,6 +136,8 @@ CMD="docker run -it --name $T_CONTAINER_NAME \
--env \"T_REGISTRATION_REQUIRES_SERVER_USER=$T_REGISTRATION_REQUIRES_SERVER_USER\" \
--env \"T_CENTRALLY_MANAGED_USER_PROFILE=$T_CENTRALLY_MANAGED_USER_PROFILE\" \
--env \"T_CATEGORIES=$T_CATEGORIES\" \
--env \"T_ORIENTATION=$T_ORIENTATION\" \
$T_PORT_MAPPING \
-p 9229:9229 \
-p 9228:9228 \
Expand Down

0 comments on commit b836f10

Please sign in to comment.