-
Notifications
You must be signed in to change notification settings - Fork 2
Remove source folder after build #1012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.x
Are you sure you want to change the base?
Conversation
After the build process is done, we have no more need for the source folder. Deleting it saves us around 150MB on the server where it is deployed, for each release we do.
| ./node_modules/.bin/gulp build; | ||
|
|
||
| echo "Removing gent_base 'source' directory..."; | ||
| rm -rf ../source; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lokaal blijft het handig om de source niet te verwijderen tijdens het install script, ook bij bijv. een git checkout versie van het thema waarbij het install script gerund wordt, dan heb je uiteraard de source zeker nodig om aanpassingen te maken. Is het misschien een idee om een install-prod.sh te maken waarbij install.sh ingeladen wordt + extra commands zoals in deze commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dat is een idee, maar dan moeten we op één of andere manier zeker zijn dat die install-prod.sh telkens bij composer install wordt uitgevoerd wanneer deze op onze deploy server wordt uitgevoerd, want momenteel wordt deze install.sh als post-install-script van composer uitgevoerd overal waar gent_base wordt gebruikt. Als we dat aanpassen loopt dat script ook nog steeds bij jullie lokaal...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jelle-S Is het mss mogelijk om die source folder uit te sluiten van een build, bv. via .npmignore (voor NPM builds) of in de CI/CD excluden?
|
@Jelle-S & @lennartvava : You could use the COMPOSER_DEV_MODE variable to check if the install was performed with or without the dev packages (by default with).
See https://getcomposer.org/doc/articles/scripts.md#defining-scripts
|
After the build process is done, we have no more need for the source folder. Deleting it saves us around 150MB on the server where it is deployed, for each release we do.