Skip to content

Commit

Permalink
clean node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
scripthunter7 committed Mar 6, 2024
1 parent 3bd2d17 commit 86606c3
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 9 deletions.
30 changes: 25 additions & 5 deletions bamboo-specs/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ Build:
# Create build.txt file with version
yarn build:txt
# Cleanup
rm -rf node_modules
rm -rf client/node_modules
rm -rf server/node_modules
- inject-variables:
file: out/build.txt
scope: RESULT
Expand All @@ -86,6 +81,31 @@ Build:
configuration:
selectedRepository: defaultRepository
tagName: v${bamboo.inject.version}
final-tasks:
- script:
interpreter: SHELL
scripts:
- |-
set -x
set -e
# Fix mixed logs
exec 2>&1
ls -la
echo "Size before cleanup:" && du -h | tail -n 1
# cleanup root directory
rm -rf node_modules
# cleanup client directory
rm -rf client/node_modules
# cleanup server directory
rm -rf server/node_modules
echo "Size after cleanup:" && du -h | tail -n 1
# Store the .vsix file as a build artifact
artifacts:
- name: vscode-adblock.vsix
Expand Down
21 changes: 20 additions & 1 deletion bamboo-specs/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,28 @@ marketplace.visualstudio.com:
# https://code.visualstudio.com/api/working-with-extensions/publishing-extension#publish-an-extension
yarn vsce publish -p ${bamboo.vsceToken} -i vscode-adblock.vsix
final-tasks:
- script:
interpreter: SHELL
scripts:
- |-
set -x
set -e
# Cleanup
# Fix mixed logs
exec 2>&1
ls -la
echo "Size before cleanup:" && du -h | tail -n 1
# cleanup root directory
# note: no need to clean client and server directories here, because we only installed
# dependencies in the root directory
# TODO: switch to yarn workspaces
rm -rf node_modules
echo "Size after cleanup:" && du -h | tail -n 1
requirements:
- adg-docker: 'true'
notifications:
Expand Down
24 changes: 21 additions & 3 deletions bamboo-specs/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,31 @@ Build:
# Run Jest tests
yarn test
final-tasks:
- script:
interpreter: SHELL
scripts:
- |-
set -x
set -e
# Cleanup
# Fix mixed logs
exec 2>&1
ls -la
echo "Size before cleanup:" && du -h | tail -n 1
# cleanup root directory
rm -rf node_modules
# cleanup client directory
rm -rf client/node_modules
# cleanup server directory
rm -rf server/node_modules
final-tasks:
- clean
echo "Size after cleanup:" && du -h | tail -n 1
requirements:
- adg-docker: true

Expand Down

0 comments on commit 86606c3

Please sign in to comment.