Skip to content

Commit

Permalink
🔀 Merge branch 'master' into loki
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrenoy committed Nov 5, 2020
2 parents 3fec58b + bd87522 commit 7360db3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -71,17 +71,17 @@ deploy:
condition: $PACKAGECLOUD = true
- provider: script
skip_cleanup: true
script: scripts/deploy_snapshot.sh
script: scripts/deploy.sh snapshots
on:
branch: master
- provider: script
skip_cleanup: true
script: scripts/deploy_loki.sh
script: scripts/deploy.sh loki
on:
branch: loki
- provider: script
skip_cleanup: true
script: scripts/deploy_release.sh
script: scripts/deploy.sh release
on:
tags: true

Expand Down
30 changes: 30 additions & 0 deletions scripts/deploy.sh
@@ -0,0 +1,30 @@
#!/bin/bash

readonly DEST="${1:-snapshots}"

main() {
local var
local file

for var in PACKAGE OS DIST
do
if [ -z ${!var} ]
then
echo "ERROR: environment variable [${var}] must be set."
exit 1
fi
done

for file in build/*.${PACKAGE}
do
echo "Pushing $file to cloudsmith..."
cloudsmith push ${PACKAGE} asbru-cm/${DEST}/${OS}/${DIST} $file
done

if [ $PACKAGE == "deb" ]
then
echo "Pushing DSC files to cloudsmith..."
cloudsmith push ${PACKAGE} asbru-cm/${DEST}/${OS}/${DIST} build/*.dsc --sources-file build/*.debian.tar.xz
fi
}
main
12 changes: 0 additions & 12 deletions scripts/deploy_release.sh

This file was deleted.

12 changes: 0 additions & 12 deletions scripts/deploy_snapshot.sh

This file was deleted.

0 comments on commit 7360db3

Please sign in to comment.