-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
32 lines (24 loc) · 1.1 KB
/
build.sh
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
# Build new version of Js-Ext, build new version of Js-Ext with new version of Js-Ext, build and run tests, after apply new version
build (){
node "build/js-ext.js" "src/js-ext.jsx" || exit 11
echo [Js-Ext has been builded by previous version]
node "build/js-ext-new.js" "src/js-ext.jsx" || exit 12
echo [Js-Ext has been builded by new version]
node "build/js-ext-new.js" "tests/tests.jsx" && node "tests/temp/tests.js" || exit 13
echo [Tests passed]
node "build/js-ext-new.js" --keep-order "tests/tests-ko.jsx" && node "tests/temp/tests-ko.js" || exit 13
echo [Tests with --keep-order passed]
node "build/js-ext-new.js" --keep-order "tests/tests-new.jsx" && node "tests/temp/tests-new.js" || exit 14
echo [New tests passed]
mv "build/js-ext-new.js" "build/js-ext.js" || exit 15
echo [New version applied]
}
# Build new version of Js-Ext, build and run "current.jsx"
current (){
node "build/js-ext.js" "src/js-ext.jsx" || exit 21
echo [Js-Ext has been builded]
node "build/js-ext-new.js" "tests/current.jsx" && node "$0/../tests/temp/current.js" || exit 22
echo [Success]
}
cd `dirname $0` || exit 1
build