diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..8278f1344 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "alfresco-js-api"] + path = alfresco-js-api + url = https://github.com/Alfresco/alfresco-js-api diff --git a/alfresco-js-api b/alfresco-js-api new file mode 160000 index 000000000..a7e88e552 --- /dev/null +++ b/alfresco-js-api @@ -0,0 +1 @@ +Subproject commit a7e88e55269df1969c98340516290555738df18b diff --git a/init-submodules.sh b/init-submodules.sh new file mode 100755 index 000000000..9dcb97458 --- /dev/null +++ b/init-submodules.sh @@ -0,0 +1,2 @@ +#!/bin/bash +git submodule update --init diff --git a/package.json b/package.json index bb73e46c7..625f35d16 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build.extensions": "npm run build:aos-extension", "build.app": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app", "build": "npm run validate-config && npm run build.shared && npm run build.extensions && npm run build.app -- --prod", + "build.js-api": "./init-submodules.sh && ./scripts/install-local-js-api.sh && npm run build", "build.e2e": "npm run build.shared && npm run build.extensions && npm run build.app -- --prod --configuration=e2e", "test": "ng test app --code-coverage", "test:ci": "npm run build.shared && npm run build.extensions && ng test adf-office-services-ext --watch=false && ng test app --code-coverage --watch=false", diff --git a/scripts/install-local-js-api.sh b/scripts/install-local-js-api.sh new file mode 100755 index 000000000..f1849891e --- /dev/null +++ b/scripts/install-local-js-api.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +rm -rf node_modules +./alfresco-js-api/scripts/build.sh +npm install +rm -rf node_modules/@alfresco/js-api +mkdir -p node_modules/@alfresco/js-api +cp -rf alfresco-js-api/dist/package/* node_modules/@alfresco/js-api diff --git a/start-sso.sh b/start-sso.sh deleted file mode 100755 index dd5054dd3..000000000 --- a/start-sso.sh +++ /dev/null @@ -1,18 +0,0 @@ -export HOST_IP=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1) -export APP_URL="http://${HOST_IP}:8080" - -export APP_CONFIG_AUTH_TYPE="OAUTH" -export APP_CONFIG_OAUTH2_HOST="http://${HOST_IP}:8085/auth/realms/alfresco" -export APP_CONFIG_OAUTH2_CLIENTID="alfresco" -export APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="${APP_URL}/assets/silent-refresh.html" -export APP_CONFIG_OAUTH2_REDIRECT_LOGIN="/" -export APP_CONFIG_OAUTH2_REDIRECT_LOGOUT="/logout" - -docker-compose -f docker-compose-keycloak.yml up -d --build - -echo "Waiting for the app..." -npm run wait:app - -echo "HOST_IP: ${HOST_IP}" -echo "Realm: ${APP_CONFIG_OAUTH2_HOST}" -echo "Content Workspace: ${APP_URL}" diff --git a/start.sh b/start.sh index 34de17fc8..7beafa428 100755 --- a/start.sh +++ b/start.sh @@ -70,7 +70,7 @@ if [[ $KEYCLOAK == "true" ]]; then export APP_CONFIG_OAUTH2_CLIENTID="alfresco" export APP_CONFIG_OAUTH2_IMPLICIT_FLOW=true export APP_CONFIG_OAUTH2_SILENT_LOGIN=true - export APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="${APP_URL}assets/silent-refresh.html" + export APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI="${APP_URL}/assets/silent-refresh.html" export APP_CONFIG_OAUTH2_REDIRECT_LOGIN="/$URL_FRAGMENT/" export APP_CONFIG_OAUTH2_REDIRECT_LOGOUT="/$URL_FRAGMENT/logout" # export APP_BASE_SHARE_URL="${APP_URL}#/preview/s" diff --git a/update-submodules.sh b/update-submodules.sh new file mode 100755 index 000000000..69a420d24 --- /dev/null +++ b/update-submodules.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +git pull +git submodule sync --recursive +git submodule update --init --recursive +# Go through all of the submodules switching them to their branches and updating them + +echo +echo "Updating alfresco-js-api ..." +echo -------------------------- +cd alfresco-js-api && git checkout master && git pull +cd .. + +echo