-
Notifications
You must be signed in to change notification settings - Fork 3
/
.rultor.yml
41 lines (41 loc) · 1.21 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
architect:
- yegor256
- davvd
docker:
image: yegor256/rultor-image:1.20.0
assets:
id_rsa: "zerocracy/home#assets/blog/id_rsa"
id_rsa.pub: "zerocracy/home#assets/blog/id_rsa.pub"
install: |
sudo apt-get -y update
sudo apt-get -y install imagemagick
sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
merge:
script: |
bundle exec rake
release:
script: |
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
sed -i "s/0\.0\.0/${tag}/g" tex/_version.tex
sed -i "s/0\.0\.0/${tag}/g" html/index.html
git add tex/_version.tex html/index.html
git commit -m "Version set to ${tag}"
bundle exec rake
mkdir -p ~/.ssh
mv ../id_rsa ../id_rsa.pub ~/.ssh
chmod -R 600 ~/.ssh/*
echo -e "Host *\n StrictHostKeyChecking no\n UserKnownHostsFile=/dev/null" > ~/.ssh/config
git config --global user.email "[email protected]"
git config --global user.name "Rultor"
temp=$(mktemp -d)
cp target/*.pdf ${temp}
cp target/*.png ${temp}
cp target/*.html ${temp}
git checkout gh-pages
git clean -fd
cp -R ${temp}/*.pdf .
cp -R ${temp}/*.png .
cp -R ${temp}/*.html .
git add .
git commit -am "New papers, version ${tag}"
git push origin gh-pages