File: encryptAll.sh

package info (click to toggle)
scala-parser-combinators 1.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 364 kB
  • sloc: xml: 59; sh: 21; makefile: 16
file content (19 lines) | stat: -rwxr-xr-x 812 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# Based on https://gist.github.com/kzap/5819745:

echo "This will encrypt the cleartext sensitive.sbt and admin/secring.asc, while making the encrypted versions available for decryption on Travis."
echo "Update your .travis.yml as directed, and delete the cleartext versions."
echo "Press enter to continue."
read

# 1. create a secret, put it in an environment variable while encrypting files -- UNSET IT AFTER
export SECRET=$(cat /dev/urandom | head -c 10000 | openssl sha1)

# 2. add the "secure: ..." line under the env section -- generate it with ``  (install the travis gem first)
travis encrypt SECRET=$SECRET

admin/encrypt.sh admin/secring.asc
admin/encrypt.sh sensitive.sbt

echo "Remember to rm sensitive.sbt admin/secring.asc -- once you do, they cannot be recovered (except on Travis)!"