fixed publish script not to fail when there are no packages
This commit is contained in:
parent
d056f93073
commit
3952fdb4a8
@ -1,22 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [ ! $# == 1 ]; then
|
||||
|
||||
echo "Usage: $0 <fuel-package-name.tar.gz>"
|
||||
|
||||
lines=`ls fuel-*.tar.gz 2> /dev/null`
|
||||
if [[ ! $lines ]]; then
|
||||
echo "No archives available for publishing"
|
||||
else
|
||||
echo "Available archives for publishing:"
|
||||
for line in `ls fuel-*.tar.gz`; do echo " * $line (run \"$0 $line\")"; done
|
||||
for line in $lines; do echo " * $line (run \"$0 $line\")"; done
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
fi
|
||||
|
||||
package_file="$1"
|
||||
|
||||
if [ ! -f $package_file ];
|
||||
then
|
||||
if [ ! -f $package_file ]; then
|
||||
echo "File $package_file not found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
#
|
||||
# publish package to http://download.mirantis.com/fuel-releases/
|
||||
#
|
||||
rsync -v $package_file rsync://repo.srt.mirantis.net:/repo/fuel-releases/$package_file
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user