Blame view

node_modules/we-cropper/scripts/release/release.sh 465 Bytes
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  set -e
  echo "Enter release version: "
  read VERSION
  
  read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
  echo    # (optional) move to a new line
  if [[ $REPLY =~ ^[Yy]$ ]]
  then
    echo "Releasing $VERSION ..."
    npm test
  
    # commit
    npm version $VERSION --message "build: $VERSION"
    npm run build
  
    git add -A
    git commit -m "release: $VERSION"
    git push
  
    # publish
    git tag $VERSION -m "release: $VERSION"
    git push origin "$VERSION"
    npm publish
  fi