Skip to content

Commit

Permalink
chore: test build and platform updates
Browse files Browse the repository at this point in the history
PR to get a sandbox that tests using design tokens versions
of frontend-build and frontend-platform without changing
this MFE to use design tokens

this is to verify that it is safe to merge the design tokens support
PRs to frontend-build and frontend-platform and that they do
not contain any breaking changes
  • Loading branch information
brian-smith-tcril committed Jul 29, 2024
1 parent db883ca commit e899784
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"extends @edx/browserslist-config"
],
"scripts": {
"build": "fedx-scripts webpack",
"build": "sh run-build-for-gh-deps.sh",
"i18n_extract": "fedx-scripts formatjs extract",
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"lint:fix": "fedx-scripts eslint --ext .js --ext .jsx . --fix",
Expand Down
102 changes: 102 additions & 0 deletions run-build-for-gh-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
#!/bin/bash

# TODO: This file is temporary and will be removed after testing

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

run_command() {
echo "\$ $1"
eval $1
}

log "Starting deployment script"
run_command "pwd"

# frontend-platform
log "Processing frontend-platform"
run_command "cd node_modules/@edx/" || exit
log "Current directory: $(pwd)"
run_command "rm -rf frontend-platform"
run_command "mkdir frontend-platform" || exit
run_command "ls -l"
run_command "git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-platform.git frontend-platform-temp"
run_command "cd frontend-platform-temp" || exit
log "Current directory: $(pwd)"
run_command "cat package.json" || exit
run_command "ls -l"
run_command "cp -r dist/. ../frontend-platform/" || exit
run_command "cd .." || exit
run_command "ls -l"
log "Current directory: $(pwd)"
run_command "rm -rf frontend-platform-temp"
run_command "cd frontend-platform" || exit
run_command "ls -l"
run_command "cd ../../.."
log "Current directory: $(pwd)"

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

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

# # frontend-component-header
# log "Processing frontend-component-header"
# run_command "cd node_modules/@edx/" || exit
# log "Current directory: $(pwd)"
# run_command "rm -rf frontend-component-header"
# run_command "mkdir frontend-component-header" || exit
# run_command "git clone -b Peter_Kulko/support-design-tokens --single-branch https://github.com/PKulkoRaccoonGang/frontend-component-header.git frontend-component-header-temp"
# run_command "cd frontend-component-header-temp" || exit
# log "Current directory: $(pwd)"
# run_command "cp -r dist ../frontend-component-header/" || exit
# run_command "cp -r package.json ../frontend-component-header/" || exit
# run_command "cd .."
# run_command "rm -rf frontend-component-header-temp"
# run_command "cd ../.." || exit
# log "Current directory: $(pwd)"

# # frontend-component-footer
# log "Processing frontend-component-footer"
# run_command "cd node_modules/@edx/" || exit
# log "Current directory: $(pwd)"
# run_command "rm -rf frontend-component-footer"
# run_command "mkdir frontend-component-footer" || exit
# run_command "git clone -b Peter_Kulko/support-design-tokens --single-branch https://github.com/PKulkoRaccoonGang/frontend-component-footer.git frontend-component-footer-temp"
# run_command "cd frontend-component-footer-temp" || exit
# log "Current directory: $(pwd)"
# run_command "cp -r dist ../frontend-component-footer/" || exit
# run_command "cp -r package.json ../frontend-component-footer/" || exit
# run_command "cd .."
# run_command "rm -rf frontend-component-footer-temp"
# run_command "cd ../.." || exit
# log "Current directory: $(pwd)"

# webpack
log "Running webpack"
run_command "fedx-scripts webpack"

log "Deployment script finished."

0 comments on commit e899784

Please sign in to comment.