Skip to content

Commit

Permalink
Linux packaging fixes
Browse files Browse the repository at this point in the history
Auditors: @aekeus
  • Loading branch information
bbondy committed Feb 1, 2017
1 parent 5112b81 commit f056e26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions tools/upload_to_aptly
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,23 @@ cat <<EOF > $HOME/.aptly.conf
"SwiftPublishEndpoints": {} }
EOF

# Make sure staging and release cache isn't mixed
rm -Rf ~/.aptly

gpg --export --armor ${GPG_KEY} > ${KEY_FILE}
aws s3 cp ${KEY_FILE} s3://${OPTION}/keys.asc
aws s3api put-object-acl --acl public-read --bucket ${OPTION} --key ${KEY_NAME}

for i in xenial jessie trusty
do aptly publish drop $i s3:${OPTION}: || true
do aptly publish drop -force-drop $i s3:${OPTION}: || true
done

for i in xenial jessie trusty
do aptly repo drop --force ${i}-release || true
do aptly repo drop -force ${i}-release || true
done

for i in xenial jessie trusty
do aptly snapshot drop --force ${i}-snapshot || true
do aptly snapshot drop -force ${i}-snapshot || true
done

for i in xenial jessie trusty
Expand Down
8 changes: 4 additions & 4 deletions tools/upload_to_rpm_repo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TMP_REPO=/tmp/rpm_repo

echo "%_signature gpg
%_gpg_path $HOME/.gnupg
%_gpg_name Brave Builder
%_gpg_name Brave Software
%_gpgbin /usr/bin/gpg" > ~/.rpmmacros

rm -rf $TMP_REPO
Expand All @@ -18,14 +18,14 @@ env GPG_PASS=$PASSPHRASE ./tools/auto_rpm_sign
cp dist/*.rpm $TMP_REPO/x86_64/

for arch in $TMP_REPO/x86_64 ; do
createrepo -v --deltas $arch/
createrepo -v --deltas $arch/
done
for arch in $TMP_REPO/x86_64 ; do
createrepo -v --update --deltas $arch/
createrepo -v --update --deltas $arch/
done

gpg --export --armor ${GPG_KEY} > ${KEY_FILE}
aws s3 cp ${KEY_FILE} s3://${BUCKET}/keys.asc
aws s3api put-object-acl --acl public-read --bucket ${BUCKET} --key ${KEY_NAME}
aws s3 sync --acl public-read $TMP_REPO/ s3://$BUCKET/

rpm --checksig ./dist/*.rpm

0 comments on commit f056e26

Please sign in to comment.