Skip to content

Commit

Permalink
[TASK] Remove git lfs and download development assets
Browse files Browse the repository at this point in the history
git lfs has issues when working with multiple organisations and
lfs references are not available in all organisations. Providing
the development assets via a direct download prevents theses issues.

Related: #1047
  • Loading branch information
mschwemer committed Jul 5, 2024
1 parent 24853e3 commit b6ef013
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
22 changes: 16 additions & 6 deletions .ddev/commands/host/initialize
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@
## Usage: initialize
## Example: "ddev initialize"

if ! command -v "git-lfs" &> /dev/null
HOST=https://www.in2code.de
ASSET_PATH=fileadmin/static/extensions/powermail
ASSET_VERSION=v12
ASSETS=(powermail-fileadmin.tar.gz powermail-db.gz)

if ! command -v "curl" &> /dev/null
then
echo "COMMAND "git lfs" could not be found"
echo "Please install git-lfs support, see: https://git-lfs.github.com/"
echo "COMMAND "curl" could not be found"
echo "Please install curl for downloading necessary assets in development environment"
exit
fi

git lfs pull
for asset in "${ASSETS[@]}"
do
echo "Downloading $asset"
curl -s $HOST/$ASSET_PATH/$ASSET_VERSION/$asset -o .project/data/$asset
done

echo "Symlink configuration"
cp .build/vendor/typo3/cms-install/Resources/Private/FolderStructureTemplateFiles/root-htaccess .build/public/.htaccess
Expand All @@ -22,13 +31,14 @@ ln -snf ../../../.project/typo3/settings.php .build/config/system/settings.php
ln -snf ../../../.project/typo3/additional.php .build/config/system/additional.php

echo "Importing database"
ddev import-db --file=.project/data/db.sql.gz
mv .project/data/powermail-db.gz .project/data/powermail-db.sql.gz
ddev import-db --file=.project/data/powermail-db.sql.gz

echo "Run 'composer install'"
ddev composer install

echo "Extracting fileadmin"
tar xf .project/data/fileadmin.tar.gz -C .build/public/
tar xf .project/data/powermail-fileadmin.tar.gz -C .build/public/

echo "Copy .htaccess"
cp .build/vendor/typo3/cms-install/Resources/Private/FolderStructureTemplateFiles/root-htaccess .build/public/.htaccess
Expand Down
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,3 @@
*.sql text eol=lf
*.t3s text eol=lf
*.txt text eol=lf
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.sql.gz filter=lfs diff=lfs merge=lfs -text
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ config/
/.phpunit.result.cache
/phpunit.xml.dist.bak

.project/data/screenshots
.project/data
/.phpunit.cache/
3 changes: 0 additions & 3 deletions .project/data/db.sql.gz

This file was deleted.

3 changes: 0 additions & 3 deletions .project/data/fileadmin.tar.gz

This file was deleted.

0 comments on commit b6ef013

Please sign in to comment.