diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-04-13 09:21:14 -0700 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2016-04-13 09:24:21 -0700 |
commit | 758f72fdff548e9eee8bdba2d084e83eb39cb43f (patch) | |
tree | ab133857d9a6a5430b5c558725fc035f089fe84c | |
parent | ed6e18ad2b07bd794695a3beea918dd9e8b6c75b (diff) |
Make rpm push handle SRPMs
* Fix the rpm push to search out and push SRPMs
* Fix the rpm push to actually push a file as it was referencing a bad
variable
* Fix up some minor linting issues
Change-Id: I4d2e66ad52e593b71b969ab1b5faad254cc35e2d
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
-rw-r--r-- | jjb/vpp/include-raw-vpp-maven-push.sh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/jjb/vpp/include-raw-vpp-maven-push.sh b/jjb/vpp/include-raw-vpp-maven-push.sh index 924d335af..dc75e907b 100644 --- a/jjb/vpp/include-raw-vpp-maven-push.sh +++ b/jjb/vpp/include-raw-vpp-maven-push.sh @@ -72,13 +72,21 @@ function push_rpm () rpmfile=$1 repoId="${BASEREPOID}yum" url="${BASEURL}yum" - basefile=$(basename -s .rpm "$rpmfile") + + if grep -q srpm <<<"$rpmfile" + then + rpmtype=srpm + basefile=$(basename -s .srpm "$rpmfile") + else + rpmtype=rpm + basefile=$(basename -s .rpm "$rpmfile") + fi artifactId=$(echo "$basefile" | cut -f 1 -d '_') version=$(echo "$basefile" | cut -f 2- -d '_') - push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" rpm + push_file "$rpmfile" "$repoId" "$url" "$version" "$artifactId" "$rpmtype" } -if [ ${OS} == "ubuntu1404" ]; then +if [ "${OS}" == "ubuntu1404" ]; then # Find the files JARS=$(find . -type f -iname '*.jar') DEBS=$(find . -type f -iname '*.deb') @@ -91,10 +99,11 @@ if [ ${OS} == "ubuntu1404" ]; then do push_deb "$i" done -elif [ ${OS} == "centos7" ]; then +elif [ "${OS}" == "centos7" ]; then # Find the files RPMS=$(find . -type f -iname '*.rpm') - for i in $RPMS + SRPMS=$(find . -type f -iname '*.srpm') + for i in $RPMS $SRPMS do push_rpm "$i" done |