-
Notifications
You must be signed in to change notification settings - Fork 5
/
.rultor.yml
50 lines (41 loc) · 1.3 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
38
39
40
41
42
43
44
45
46
47
48
49
50
docker:
image: yegor256/rultor-image:1.22.0
assets:
npmrc: yegor256/home#assets/npmrc
install: |
npm install --no-color
merge:
script: |
npm run rultor --no-color
pdd --source=$(pwd) --verbose --file=/dev/null
release:
pre: false
script: |-
# Change proper version for all necessary filers
npm version "${tag}"
# Perform build
git rm -rf dist/ --ignore-unmatch
npm test --no-color
# Current branch is __rultor
# Add built files to git and commit
git add -f dist/drops-${tag}.min.css
git add -f dist/drops-${tag}.min.css.map
git commit -am "Added CSS files for ${tag}"
# We'll gonna need these files later...
mv dist/drops-${tag}.min.css /tmp
# Checkout to gh-pages and reset any modifications
branch=$(git rev-parse --abbrev-ref HEAD)
git checkout gh-pages
git reset --hard
sudo /bin/bash -c "cd '$(pwd)'; git clean -fd"
# Add the current, minified css file to the gh-pages branch
mv /tmp/drops-${tag}.min.css .
cp drops-${tag}.min.css drops.min.css
git add drops-${tag}.min.css
git add drops.min.css
# Commit and change the branch to master
git commit --allow-empty -am "${tag}"
git checkout "${branch}"
# Deploy to NPMJS
chmod 600 ../npmrc
npm publish --no-color --userconfig=../npmrc