File: release-weex.sh

package info (click to toggle)
vue.js 2.6.12%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,124 kB
  • sloc: javascript: 80,436; sh: 97; makefile: 7
file content (38 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e
CUR_VERSION=$(node build/get-weex-version.js -c)
NEXT_VERSION=$(node build/get-weex-version.js)

echo "Current: $CUR_VERSION"
read -p "Enter new version ($NEXT_VERSION): " -n 1 -r
if ! [[ -z $REPLY ]]; then
  NEXT_VERSION=$REPLY
fi

read -p "Releasing weex-vue-framework@$NEXT_VERSION - are you sure? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
  echo "Releasing weex-vue-framework@$NEXT_VERSION ..."
  npm run lint
  npm run flow
  npm run test:weex

  # build
  WEEX_VERSION=$NEXT_VERSION npm run build:weex

  # update package
  # using subshells to avoid having to cd back
  ( cd packages/weex-vue-framework
  npm version "$NEXT_VERSION"
  npm publish
  )

  ( cd packages/weex-template-compiler
  npm version "$NEXT_VERSION"
  npm publish
  )

  # commit
  git add packages/weex*
  git commit -m "[release] weex-vue-framework@$NEXT_VERSION"
fi