setversion.sh 715 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. VERSION=$1
  3. cd `dirname "$0"`/..
  4. AMBER_BASE=`pwd`
  5. cd $AMBER_BASE/src
  6. # replace version number
  7. cp Kernel-Infrastructure.st Kernel-Infrastructure.st.bak
  8. sed -e "/^version\$/,/^\! \!\$/ s/\^ '[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-pre\)\{0,1\}'\$/^ '$VERSION'/" Kernel-Infrastructure.st.bak >Kernel-Infrastructure.st
  9. rm Kernel-Infrastructure.st.bak
  10. # compile Kernel-Infrastructure
  11. cd $AMBER_BASE
  12. internal/local-amberc -D src -l Kernel-Objects,Kernel-Collections src/Kernel-Infrastructure.st
  13. # set version in all json files (bower, npm)
  14. for F in *.json; do
  15. cp $F $F.bak
  16. sed -e 's/"version": "[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-pre\)\{0,1\}"/"version": "'"$VERSION"'"/' $F.bak >$F
  17. rm $F.bak
  18. done