Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Added back local verify script.
Browse files Browse the repository at this point in the history
  • Loading branch information
stooit committed Mar 4, 2020
1 parent 57dd961 commit 7a1a000
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ahoy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ commands:
verify:
usage: Locally run the same tests that would run in circle.
cmd: |
SATIS_BUILD=app ./.circleci/build-scaffolds-against-all.sh
SATIS_BUILD=app ./verify.sh
server:
usage: Make satis available on localhost:4142
Expand Down
32 changes: 32 additions & 0 deletions verify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
IFS=$'\n\t'
set -euo pipefail

GOVCMS_SCAFFOLD="${GOVCMS_SCAFFOLD:-/tmp/govcms-build}"
SATIS_BUILD="${SATIS_BUILD:-/tmp/satis-build/app}"

rm -Rf "${GOVCMS_SCAFFOLD}"

php -S localhost:4141 -t "${SATIS_BUILD}" > /tmp/phpd.log 2>&1 &
composer create-project --no-install govcms/govcms8-scaffold-paas "${GOVCMS_SCAFFOLD}"
cd "${GOVCMS_SCAFFOLD}"
composer config secure-http false

for branch in {"","develop","master"}; do
echo -e "\n\n\n--> Test build GovCMS against http://localhost:4141/${branch}\n\n\n"

# Ensure no conflicts with composer update.
rm -Rf vendor && rm -Rf web/core && rm -Rf web/modules/contrib/* && rm -Rf web/profiles/* rm composer.lock

# Replace satis.govcms.gov.au with local build.
composer config repositories.govcms composer http://localhost:4141/"${branch}"
composer config repositories

# Point to the appropriate versions.
if [ "${branch}" = "master" ] || [ "${branch}" = "develop" ] ; then
composer require govcms/govcms:1.x govcms/require-dev:dev-"${branch}" govcms/scaffold-tooling:dev-"${branch}"
fi

composer -n -vvv update
composer validate
done

0 comments on commit 7a1a000

Please sign in to comment.