Skip to content

Commit

Permalink
refactor: added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang committed Jun 26, 2024
1 parent 67ae425 commit 24e4bfc
Showing 1 changed file with 44 additions and 16 deletions.
60 changes: 44 additions & 16 deletions run-build-for-gh-deps.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,72 @@
cd node_modules/@edx/
#!/bin/bash

log() {
echo "=============================== $1 ==============================="
}

log "Starting deployment script"
pwd

log "Processing frontend-platform"
cd node_modules/@edx/ || exit
log "Current directory: $(pwd)"
rm -rf frontend-platform
git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-platform.git
cd frontend-platform
cd frontend-platform || exit
log "Current directory: $(pwd)"
npm ci
npm run build

cp -a dist/. ../frontend-platform/
cd ..
cd .. || exit
log "Current directory: $(pwd)"
find frontend-platform -mindepth 1 -maxdepth 1 ! -name 'dist' -delete
mv frontend-platform/dist/* frontend-platform/
rm -rf frontend-platform/dist
cd ../..
cd ../.. || exit
log "Current directory: $(pwd)"

cd node_modules/@openedx/
log "Processing frontend-build"
cd node_modules/@openedx/ || exit
log "Current directory: $(pwd)"
rm -rf frontend-build
git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-build.git
cd frontend-build
cd frontend-build || exit
log "Current directory: $(pwd)"
npm ci

cp -a dist/. ../frontend-build-dist
cd ..
cd .. || exit
log "Current directory: $(pwd)"
cp -a frontend-build-dist/. frontend-build/
rm -rf frontend-build-dist
cd ../..
cd ../.. || exit
log "Current directory: $(pwd)"

cd node_modules/@openedx/
log "Processing paragon"
cd node_modules/@openedx/ || exit
log "Current directory: $(pwd)"
rm -rf paragon
mkdir -p paragon
cd paragon
cd paragon || exit
log "Current directory: $(pwd)"
npm pack @openedx/[email protected]
tar -xzf openedx-paragon-23.0.0-alpha.2.tgz --strip-components=1
rm openedx-paragon-23.0.0-alpha.2.tgz
cd ../../..
cd ../../.. || exit
log "Current directory: $(pwd)"

cd node_modules/@edx/
log "Processing frontend-component-header"
cd node_modules/@edx/ || exit
echo "Current directory: $(pwd)"
rm -rf frontend-component-header
git clone -b Peter_Kulko/support-design-tokens --single-branch https://github.com/PKulkoRaccoonGang/frontend-component-header.git
cd frontend-component-header
cd frontend-component-header || exit
echo "Current directory: $(pwd)"
npm i --force
npm run build
cd ../../..
cd ../../.. || exit
echo "Current directory: $(pwd)"

log "Running webpack"
fedx-scripts webpack

log "Deployment script finished."

0 comments on commit 24e4bfc

Please sign in to comment.