|
1 |
| -cd node_modules/@edx/ |
2 |
| -rm -rf frontend-platform |
3 |
| -git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-platform.git |
4 |
| -cd frontend-platform |
5 |
| -npm ci |
6 |
| -npm run build |
7 |
| - |
8 |
| -cp -a dist/. ../frontend-platform/ |
9 |
| -cd .. |
10 |
| -find frontend-platform -mindepth 1 -maxdepth 1 ! -name 'dist' -delete |
11 |
| -mv frontend-platform/dist/* frontend-platform/ |
12 |
| -rm -rf frontend-platform/dist |
13 |
| -cd ../.. |
14 |
| - |
15 |
| -cd node_modules/@openedx/ |
16 |
| -rm -rf frontend-build |
17 |
| -git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-build.git |
18 |
| -cd frontend-build |
19 |
| -npm ci |
20 |
| - |
21 |
| -cp -a dist/. ../frontend-build-dist |
22 |
| -cd .. |
23 |
| -cp -a frontend-build-dist/. frontend-build/ |
24 |
| -rm -rf frontend-build-dist |
25 |
| -cd ../.. |
26 |
| - |
27 |
| -cd node_modules/@openedx/ |
28 |
| -rm -rf paragon |
29 |
| -mkdir -p paragon |
30 |
| -cd paragon |
31 |
| -npm pack @openedx/ [email protected] |
32 |
| -tar -xzf openedx-paragon-23.0.0-alpha.2.tgz --strip-components=1 |
33 |
| -rm openedx-paragon-23.0.0-alpha.2.tgz |
34 |
| -cd ../../.. |
35 |
| - |
36 |
| -cd node_modules/@edx/ |
37 |
| -rm -rf frontend-component-header |
38 |
| -git clone -b Peter_Kulko/support-design-tokens --single-branch https://github.com/PKulkoRaccoonGang/frontend-component-header.git |
39 |
| -cd frontend-component-header |
40 |
| -npm i --force |
41 |
| -npm run build |
42 |
| -cd ../../.. |
43 |
| - |
44 |
| -fedx-scripts webpack |
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +log() { |
| 4 | + echo "=============================== $1 ===============================" |
| 5 | +} |
| 6 | + |
| 7 | +run_command() { |
| 8 | + echo "\$ $1" |
| 9 | + eval $1 |
| 10 | +} |
| 11 | + |
| 12 | +log "Starting deployment script" |
| 13 | +run_command "pwd" |
| 14 | + |
| 15 | +# frontend-platform |
| 16 | +log "Processing frontend-platform" |
| 17 | +run_command "cd node_modules/@edx/" || exit |
| 18 | +log "Current directory: $(pwd)" |
| 19 | +run_command "rm -rf frontend-platform" |
| 20 | +run_command "git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-platform.git" |
| 21 | +run_command "cd frontend-platform" || exit |
| 22 | +log "Current directory: $(pwd)" |
| 23 | +run_command "npm ci" |
| 24 | +run_command "npm run build" |
| 25 | +run_command "cp -a dist/. ../frontend-platform/" |
| 26 | +run_command "cd .." || exit |
| 27 | +log "Current directory: $(pwd)" |
| 28 | +run_command "find frontend-platform -mindepth 1 -maxdepth 1 ! -name 'dist' -delete" |
| 29 | +run_command "mv frontend-platform/dist/* frontend-platform/" |
| 30 | +run_command "rm -rf frontend-platform/dist" |
| 31 | +run_command "cd ../.." || exit |
| 32 | +log "Current directory: $(pwd)" |
| 33 | + |
| 34 | +# frontend-build |
| 35 | +log "Processing frontend-build" |
| 36 | +run_command "cd node_modules/@openedx/" || exit |
| 37 | +log "Current directory: $(pwd)" |
| 38 | +run_command "rm -rf frontend-build" |
| 39 | +run_command "git clone -b dcoa/design-tokens-support --single-branch https://github.com/eduNEXT/frontend-build.git" |
| 40 | +run_command "cd frontend-build" || exit |
| 41 | +log "Current directory: $(pwd)" |
| 42 | +run_command "npm ci" |
| 43 | +run_command "cd ../../.." || exit |
| 44 | +log "Current directory: $(pwd)" |
| 45 | + |
| 46 | +# paragon |
| 47 | +log "Processing paragon" |
| 48 | +run_command "ls -l" |
| 49 | +run_command "cd node_modules/@openedx/" || exit |
| 50 | +log "Current directory: $(pwd)" |
| 51 | +run_command "rm -rf paragon" |
| 52 | +run_command "mkdir -p paragon" |
| 53 | +run_command "cd paragon" || exit |
| 54 | +log "Current directory: $(pwd)" |
| 55 | +run_command "npm pack @openedx/[email protected]" |
| 56 | +run_command "tar -xzf openedx-paragon-23.0.0-alpha.2.tgz --strip-components=1" |
| 57 | +run_command "rm openedx-paragon-23.0.0-alpha.2.tgz" |
| 58 | +run_command "cd ../../.." || exit |
| 59 | +log "Current directory: $(pwd)" |
| 60 | + |
| 61 | +# frontend-component-header |
| 62 | +log "Processing frontend-component-header" |
| 63 | +run_command "cd node_modules/@edx/" || exit |
| 64 | +log "Current directory: $(pwd)" |
| 65 | +run_command "rm -rf frontend-component-header" |
| 66 | +run_command "git clone -b Peter_Kulko/support-design-tokens --single-branch https://github.com/PKulkoRaccoonGang/frontend-component-header.git" |
| 67 | +run_command "cd frontend-component-header" || exit |
| 68 | +log "Current directory: $(pwd)" |
| 69 | +run_command "npm i --force" |
| 70 | +run_command "npm run build" |
| 71 | +run_command "cd ../../.." || exit |
| 72 | +log "Current directory: $(pwd)" |
| 73 | + |
| 74 | +# webpack |
| 75 | +log "Running webpack" |
| 76 | +run_command "fedx-scripts webpack" |
| 77 | + |
| 78 | +log "Deployment script finished." |
0 commit comments