forked from objectionary/eo2js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rultor.yml
37 lines (37 loc) · 1.32 KB
/
.rultor.yml
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
docker:
image: maxonfjvipon/rultor-image-js:0.0.1
assets:
npmrc: maxonfjvipon/secrets#.npmrc
install: |
pip install git+https://chromium.googlesource.com/external/gyp
npm install --no-color
sudo npm install --no-color --global grunt-cli
npm uninstall --no-color grunt-cli
npm install --no-color mocha
pdd -f /dev/null -v
release:
pre: false
script: |
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
sed -i "s/0\.0\.0/${tag}/" eo2js/package.json
sed -i "s/0\.0\.0/${tag}/" eo2js/src/version.js
sed -i "s/0000-00-00/$(date +%Y-%m-%d)/" eo2js/src/version.js
sed -i "s/0\.0\.0/${tag}/" eo2js-runtime/package.json
npm test
git commit -am "set version to ${tag}"
chmod 600 ../npmrc
echo "eo2js dry run:"
(cd eo2js && npm publish --dry-run --userconfig=../../npmrc && cd ..) || exit 1
echo "eo2js-runtime dry run:"
(cd eo2js-runtime && npm publish --dry-run --userconfig=../../npmrc && cd ..) || exit 1
echo "Check if eo2js exists:"
npm view eo2js@${tag} && exit 1
echo "Check if eo2js-runtime exists:"
npm view eo2js-runtime@${tag} && exit 1
echo "Publishing eo2js:"
cd eo2js && npm publish --userconfig=../../npmrc && cd ..
echo "Publishing eo2js-runtime:"
cd eo2js-runtime && npm publish --userconfig=../../npmrc
merge:
script: |-
npm test