Skip to content

Commit d8f9e59

Browse files
authored
Merge pull request #67 from jtojnar/arch-deploy
Deploy releases to AUR automatically
2 parents a3c7662 + e9abf85 commit d8f9e59

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.travis.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ matrix:
2020
- rust: nightly
2121

2222
before_install:
23-
- openssl aes-256-cbc -K $encrypted_bc40b17e21fa_key -iv $encrypted_bc40b17e21fa_iv
24-
-in dist/deploy_key.enc -out dist/deploy_key -d
2523
- brew update
2624

2725
install:
@@ -40,3 +38,16 @@ script:
4038
- |
4139
cargo build --verbose &&
4240
cargo test
41+
42+
before_deploy:
43+
- openssl aes-256-cbc -K $encrypted_bc40b17e21fa_key -iv $encrypted_bc40b17e21fa_iv
44+
-in dist/deploy_key.enc -out /tmp/deploy_key -d
45+
- eval "$(ssh-agent -s)"
46+
- chmod 600 /tmp/deploy_key
47+
- ssh-add /tmp/deploy_key
48+
49+
deploy:
50+
provider: script
51+
script: dist/arch/deploy.sh
52+
on:
53+
tags: true

dist/arch/deploy.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/env bash
2+
cd "$TRAVIS_BUILD_DIR/dist/arch"
3+
4+
# Obtain mksrcinfo
5+
wget https://www.archlinux.org/packages/community/any/pkgbuild-introspection/download/ -O pkgbuild-introspection.tar.xz
6+
tar -Jxf pkgbuild-introspection.tar.xz usr/bin/mksrcinfo
7+
PATH="$PATH:$(pwd)/usr/bin"
8+
9+
# Prepare directory for deploy
10+
git clone ssh://[email protected]/tectonic.git aur
11+
cp PKGBUILD aur
12+
cd aur
13+
mksrcinfo
14+
15+
git add PKGBUILD .SRCINFO
16+
git config user.email "[email protected]"
17+
git config user.name "tectonic-deploy"
18+
git commit -m "Release $TRAVIS_TAG"
19+
20+
# Deploy to AUR
21+
git push origin master

0 commit comments

Comments
 (0)