1-image-build.sh 463 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. set -x
  3. # add dependencies
  4. # jq for parsing version information
  5. # git for cloning the repository
  6. apk add --no-cache jq git
  7. #clone the project
  8. git clone ${PROJECT_URL} ${PROJECT_NAME}
  9. cd ${PROJECT_NAME}
  10. git checkout ${CHECKOUT_BRANCH}
  11. # install the project
  12. npm install
  13. # inject the version number
  14. VERSION=$(jq -r '.version' package.json)
  15. sed -i "s/insert-version/${VERSION}/g" ./src/routes/settings.html/+page.svelte
  16. # build the project
  17. npm run build