forked from cliqz-oss/browser-f
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sign_lin.sh
executable file
·34 lines (29 loc) · 918 Bytes
/
sign_lin.sh
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
#!/bin/bash
set -e
set -x
source cliqz_env.sh
cd $SRC_BASE
cd $OBJ_DIR
echo '***** Generate DEBIAN repository *****'
gpg --allow-secret-key-import --import $DEBIAN_GPG_KEY
# get key name from the key, example:
# :user ID packet: "Debian PR <[email protected]>"
# gives:
GPG_KEY_NAME=`gpg --list-packets $DEBIAN_GPG_KEY | grep "user ID packet" | head -1 | grep -Po "<\K([^>]+)"`
rm -rf debian ~/.aptly aptly
mkdir debian
cp dist/*.deb debian/
aptly repo create -component=main -distribution=stable cliqz-$CQZ_RELEASE_CHANNEL
aptly repo add cliqz-$CQZ_RELEASE_CHANNEL ./debian/
aptly publish repo \
-architectures=i386,amd64 \
-batch=true \
-gpg-key=$GPG_KEY_NAME \
-passphrase-file=../debian.gpg.pass \
cliqz-$CQZ_RELEASE_CHANNEL
mv ~/.aptly/public aptly
OLD_LANG=$LANG
export LANG='en_US.UTF-8'
aws s3 sync --delete aptly/ $CQZ_S3_DEBIAN_REPOSITORY_URL
export LANG=$OLD_LANG