-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
48 lines (41 loc) · 1.56 KB
/
.travis.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
sudo: required
language: c
services: docker
branches:
only:
- /^latest\//
env:
global:
- DOCKERHUB_IMG=yhnw/openwrt-sdk
- OPENWRT_GID=1000
before_install:
- git config --global user.name "Travis CI"
- git config --global user.email "travis@example.com"
script:
- git fetch origin '+refs/heads/master:refs/remotes/origin/master' '+refs/heads/latest/*:refs/remotes/origin/latest/*'
- git checkout -b master origin/master
- |
for branch in $(git branch -a | grep 'remotes/origin/latest/*' | perl -pe 's|\s*remotes/||'); do
echo "Merging '$branch' to master..."
git merge --no-edit $branch
done
- git log --graph --abbrev-commit --date=relative
- scripts/chgrp-for-docker.sh -g $OPENWRT_GID -R .
- scripts/extract-encrypted-tar.sh -K $encrypted_7fd34a514aa3_key -iv $encrypted_7fd34a514aa3_iv secrets.tar.enc secret.key
- docker run --rm -it -u openwrt -w /home/openwrt -v $(pwd):/work yhnw/openwrt-sdk:17.01-ar71xx /work/scripts/make-index-and-sign.sh -s /work/secret.key /work
- rm secret.key
- git status
- git add -A
- git commit -a -m 'Add index and signature files'
before_deploy:
- git branch
- git config --global "url.git@github.com:.pushinsteadof" "https://github.com/"
- if [[ -e $HOME/.ssh ]] ; then mv $HOME/.ssh $HOME/.ssh.orig ; fi
- scripts/extract-encrypted-tar.sh -K $encrypted_7fd34a514aa3_key -iv $encrypted_7fd34a514aa3_iv secrets.tar.enc .ssh/
- mv .ssh $HOME/.ssh
deploy:
- provider: script
script: git push -f origin master:gh-pages
skip_cleanup: true
on:
branch: latest/*