Skip to content

Commit 5da49c0

Browse files
committed
Updated pantheon script.
1 parent 1e79be1 commit 5da49c0

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ sudo: false
44

55
php:
66
- 7.3
7+
- 7.4
78

89
env:
910
global:
@@ -12,7 +13,6 @@ env:
1213
matrix:
1314
- RELEASE=stable COMPOSER_CHANNEL=stable
1415
- RELEASE=dev COMPOSER_CHANNEL=stable
15-
- RELEASE=stable COMPOSER_CHANNEL=snapshot
1616

1717
before_install:
1818
- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini

scripts/bash/pantheon-deploy.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
#!/usr/bin/env bash
22

3-
# Abort if anything fails
4-
set -e
5-
63
PROJECT_ROOT="${LANDO_MOUNT}"
74
BUILD_DIR="$PROJECT_ROOT/build/pantheon"
85

96
echo -e "Syncing repo..."
107
if [ ! -d "$BUILD_DIR" ]; then
11-
cd "${PROJECT_ROOT}/build"
8+
cd "${PROJECT_ROOT}/build" || exit
129
git clone "ssh://codeserver.dev.${PANTHEON_SITE_ID}@codeserver.dev.${PANTHEON_SITE_ID}.drush.in:2222/~/repository.git" pantheon
1310
else
14-
cd "${BUILD_DIR}"
11+
cd "${BUILD_DIR}" || exit
1512
git pull origin master
1613
fi
1714

1815
# Copy Composer files.
19-
cd "${PROJECT_ROOT}"
16+
cd "${PROJECT_ROOT}" || exit
2017
cp composer.json "${BUILD_DIR}"
2118
cp composer.lock "${BUILD_DIR}"
2219
cp load.env.php "${BUILD_DIR}"
2320

2421
# Remove build/html from composer path.
25-
cd "${BUILD_DIR}"
22+
cd "${BUILD_DIR}" || exit
2623
sed -i -e "s/build\/html\//web\//g" composer.json
2724
sed -i -e "s/build\/html\//web\//g" composer.lock
2825
sed -i -e "s/build\/drush/drush/g" composer.json
2926
sed -i -e "s/build\/drush/drush/g" composer.lock
3027

3128
echo -e "Installing composer dependencies..."
32-
cd "${BUILD_DIR}"
29+
cd "${BUILD_DIR}" || exit
3330
composer install --no-dev
3431

3532
# Copy custom files.
@@ -39,6 +36,14 @@ rsync -vzhr --delete "${PROJECT_ROOT}/src/profiles/" "${BUILD_DIR}/web/profiles/
3936
rsync -vzhr --delete "${PROJECT_ROOT}/src/modules/" "${BUILD_DIR}/web/modules/custom/"
4037
rsync -vzhr --delete --exclude '.gitignore' "${PROJECT_ROOT}/src/themes/" "${BUILD_DIR}/web/themes/custom"
4138

39+
# get correct path fot splits.
40+
if [ -f "${BUILD_DIR}/web/libraries/config/default/config_split.config_split.dev.yml" ]; then
41+
sed -i -e "s+../../src/+../+g" config/default/config_split.config_split.dev.yml
42+
fi
43+
if [ -f "${BUILD_DIR}/web/libraries/config/default/config_split.config_split.prod.yml" ]; then
44+
sed -i -e "s+../../src/+../+g" config/default/config_split.config_split.prod.yml
45+
fi
46+
4247
# Remove .git submodules
4348
echo -e "Removing .git submodules"
4449
cd "${BUILD_DIR}/web/modules/" && find . -name ".git" -exec rm -Rf {} \;
@@ -51,9 +56,9 @@ if [ -d "${BUILD_DIR}/web/themes/" ]; then
5156
fi
5257
cd "${BUILD_DIR}/vendor" && find . -name ".git" -exec rm -Rf {} \;
5358

54-
cd "${PROJECT_ROOT}"
59+
cd "${PROJECT_ROOT}" || exit
5560
IT=$(git log -1 --pretty=format:"%an, %s - %ai" $*)
56-
cd "${BUILD_DIR}"
61+
cd "${BUILD_DIR}" || exit
5762
echo -e "Commit and push"
5863
git add .
5964
echo "$IT"

0 commit comments

Comments
 (0)