Skip to content

Commit ed72b28

Browse files
committed
remove site files and database from devcontainer image
1 parent 2dc5565 commit ed72b28

2 files changed

Lines changed: 10 additions & 42 deletions

File tree

uceap-drupal-dev-refresh-content

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,23 @@ if ( ! command -v drush > /dev/null ); then
2424
export PATH="`pwd`/vendor/bin:$PATH"
2525
fi
2626

27-
# we need to preserve gitconfig if it already exists
28-
if [ -f ~/.gitconfig ]; then
29-
gitconfig_existed=true
30-
fi
31-
# ownership of the workspace directory won't match when using bindfs
32-
git config --global --add safe.directory "$(pwd)"
33-
# gh runs git, so we need to set the safe.directory in order for it to work
34-
gh release download --clobber --pattern '*.gz'
35-
# but later on vscode will try setting global git config (credential helper, etc) ONLY if gitconfig doesn't exist
36-
if [ ! $gitconfig_existed ]; then
37-
rm ~/.gitconfig
38-
fi
39-
# FWIW vscode will also fix the safe.directory setting
40-
41-
tar zx --no-same-permissions --strip-components 1 -C web/sites/default/files -f files.tar.gz
42-
rm files.tar.gz
27+
# FIXME
28+
# this script used to download database/files from github packages
29+
# now we need to download from pantheon backups instead
30+
# tar zx --no-same-permissions --strip-components 1 -C web/sites/default/files -f files.tar.gz
31+
# rm files.tar.gz
4332

44-
# no-same-permissions doesn't seem to work so we fix it here
45-
sudo find web/sites/default/files -type d -exec chmod g+ws {} +
46-
sudo find web/sites/default/files -type f -exec chmod g+w {} +
33+
# # no-same-permissions doesn't seem to work so we fix it here
34+
# sudo find web/sites/default/files -type d -exec chmod g+ws {} +
35+
# sudo find web/sites/default/files -type f -exec chmod g+w {} +
4736

4837
# the first time we run this script the default umask is still in effect,
4938
# which messes up permissions on the profiler directory that gets created when the caches are rebuilt by db-rebuild.sh
5039
umask 002
5140

5241
sudo service mariadb start
53-
build/db-rebuild.sh database.sql.gz
54-
rm database.sql.gz
42+
# build/db-rebuild.sh database.sql.gz
43+
# rm database.sql.gz
5544

5645
# Run local devcontainer lifecycle scripts
5746
if [ -x .devcontainer/updateContent.sh ]; then

uceap-drupal-dev-update-content

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,6 @@ if ( ! command -v drush > /dev/null ); then
1818
export PATH="`pwd`/vendor/bin:$PATH"
1919
fi
2020

21-
# we need to preserve gitconfig if it already exists
22-
if [ -f ~/.gitconfig ]; then
23-
gitconfig_existed=true
24-
fi
25-
# ownership of the workspace directory won't match when using bindfs
26-
git config --global --add safe.directory "$(pwd)"
27-
# gh runs git, so we need to set the safe.directory in order for it to work
28-
gh release download --clobber --pattern 'files.tar.gz'
29-
# but later on vscode will try setting global git config (credential helper, etc) ONLY if gitconfig doesn't exist
30-
if [ ! $gitconfig_existed ]; then
31-
rm ~/.gitconfig
32-
fi
33-
# FWIW vscode will also fix the safe.directory setting
34-
35-
tar zx --no-same-permissions --strip-components 1 -C web/sites/default/files -f files.tar.gz
36-
rm files.tar.gz
37-
38-
# no-same-permissions doesn't seem to work so we fix it here
39-
sudo find web/sites/default/files -type d -exec chmod g+ws {} +
40-
sudo find web/sites/default/files -type f -exec chmod g+w {} +
41-
4221
# the first time we run this script the default umask is still in effect,
4322
# which messes up permissions on the profiler directory that gets created when the caches are rebuilt by db-rebuild.sh
4423
umask 002

0 commit comments

Comments
 (0)