File tree 5 files changed +84
-6
lines changed
5 files changed +84
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ const main = fs
15
15
. replace ( / V u e \. v e r s i o n = ' [ ^ ' ] + ' / , "Vue.version = '" + version + "'" )
16
16
fs . writeFileSync ( 'src/core/index.js' , main )
17
17
18
+ // update weex subversion
19
+ const weexVersion = process . env . WEEX_VERSION || require ( '../packages/weex-vue-framework/package.json' ) . version
20
+ const weexMain = fs
21
+ . readFileSync ( 'src/entries/weex-framework.js' , 'utf-8' )
22
+ . replace ( / V u e \. v e r s i o n = ' [ ^ ' ] + ' / , "Vue.version = '" + weexVersion + "'" )
23
+ fs . writeFileSync ( 'src/entries/weex-framework.js' , weexMain )
24
+
18
25
let builds = require ( './config' ) . getAllBuilds ( )
19
26
20
27
// filter builds via command line arg
@@ -23,6 +30,11 @@ if (process.argv[2]) {
23
30
builds = builds . filter ( b => {
24
31
return filters . some ( f => b . dest . indexOf ( f ) > - 1 )
25
32
} )
33
+ } else {
34
+ // filter out weex builds by default
35
+ builds = builds . filter ( b => {
36
+ return b . dest . indexOf ( 'weex' ) === - 1
37
+ } )
26
38
}
27
39
28
40
build ( builds )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ npm run test:types
5
5
npm run test:cover
6
6
npm run test:e2e -- --env phantomjs
7
7
npm run test:ssr
8
+ npm run test:weex
8
9
9
10
# report coverage stats for non-PRs
10
11
if [[ -z $CI_PULL_REQUEST ]]; then
Original file line number Diff line number Diff line change
1
+ var coreVersion = require ( '../package.json' ) . version
2
+ var weexVersion = require ( '../packages/weex-vue-framework/package.json' ) . version
3
+ var weexBaseVersion = weexVersion . match ( / ^ [ \d . ] + / ) [ 0 ]
4
+ var weexSubVersion = Number ( weexVersion . match ( / - w e e x \. ( \d + ) $ / ) [ 1 ] )
5
+
6
+ if ( weexBaseVersion === coreVersion ) {
7
+ // same core version, increment sub version
8
+ weexSubVersion ++
9
+ } else {
10
+ // new core version, reset sub version
11
+ weexSubVersion = 1
12
+ }
13
+
14
+ if ( process . argv [ 2 ] === '-c' ) {
15
+ console . log ( weexVersion )
16
+ } else {
17
+ console . log ( weexBaseVersion + '-weex.' + weexSubVersion )
18
+ }
19
+
20
+ module . exports = {
21
+ base : weexBaseVersion ,
22
+ sub : weexSubVersion
23
+ }
Original file line number Diff line number Diff line change 1
1
# TODO, only release weex package by bumping the weex postfix
2
+ set -e
3
+ CUR_VERSION=` node build/get-weex-version.js -c`
4
+ NEXT_VERSION=` node build/get-weex-version.js`
5
+
6
+ echo " Current: $CUR_VERSION "
7
+ read -p " Enter new version ($NEXT_VERSION ): " -n 1 -r
8
+ if ! [[ -z $REPLY ]]; then
9
+ NEXT_VERSION=$REPLY
10
+ fi
11
+
12
+ read -p " Releasing weex-vue-framework@$NEXT_VERSION - are you sure? (y/n) " -n 1 -r
13
+ echo
14
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
15
+ echo " Releasing weex-vue-framework@$NEXT_VERSION ..."
16
+ npm run lint
17
+ npm run flow
18
+ npm run test:weex
19
+
20
+ # build
21
+ WEEX_VERSION=$NEXT_VERSION npm run build:weex
22
+
23
+ # update package
24
+ cd packages/weex-vue-framework
25
+ npm version $NEXT_VERSION
26
+ npm publish
27
+ cd -
28
+
29
+ cd packages/weex-template-compiler
30
+ npm version $NEXT_VERSION
31
+ npm publish
32
+ cd -
33
+
34
+ # commit
35
+ git add src/entries/weex-framework.js
36
+ git add packages/weex-template-compiler
37
+ git add packages/weex-vue-framework
38
+ git commit -m " [release] weex-vue-framework@$NEXT_VERSION "
39
+ fi
Original file line number Diff line number Diff line change 1
1
set -e
2
- echo " Enter release version: "
3
- read VERSION
4
2
5
- read -p " Releasing $VERSION - are you sure? (y/n)" -n 1 -r
6
- echo # (optional) move to a new line
7
- if [[ $REPLY =~ ^[Yy]$ ]]
8
- then
3
+ if [[ -z $1 ]]; then
4
+ echo " Enter new version: "
5
+ read VERSION
6
+ else
7
+ VERSION=$1
8
+ fi
9
+
10
+ read -p " Releasing $VERSION - are you sure? (y/n) " -n 1 -r
11
+ echo
12
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
9
13
echo " Releasing $VERSION ..."
10
14
export SAUCE_BUILD_ID=$VERSION :` date +" %s" `
11
15
You can’t perform that action at this time.
0 commit comments