From 594ea6171dca58acb35fd052b6def35c50479161 Mon Sep 17 00:00:00 2001 From: Eric Ball Date: Thu, 27 Sep 2018 12:39:58 -0700 Subject: Use os-release for opensuse info Puppet, and therefore facter, are not officially supported on OpenSUSE, and currently not available for OpenSUSE 15. Using the os-release file to get the version info should be a viable alternative. Change-Id: Id4787d9b836a783792e5e5ae3b895e87b95f08cf Signed-off-by: Eric Ball --- jjb/scripts/packagecloud_push.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'jjb/scripts/packagecloud_push.sh') diff --git a/jjb/scripts/packagecloud_push.sh b/jjb/scripts/packagecloud_push.sh index c38d03b02..c37ac55fb 100644 --- a/jjb/scripts/packagecloud_push.sh +++ b/jjb/scripts/packagecloud_push.sh @@ -8,11 +8,11 @@ echo "STARTING PACKAGECLOUD PUSH" sleep 10 if [ -f /usr/bin/zypper ]; then - echo "Since zypper exists, us it to install facter" - zypper -n install facter + FACTER_OS="openSUSE" +else + FACTER_OS=$(/usr/bin/facter operatingsystem) fi -FACTER_OS=$(/usr/bin/facter operatingsystem) if [ -f ~/.packagecloud ]; then case "$FACTER_OS" in Ubuntu) @@ -26,10 +26,11 @@ if [ -f ~/.packagecloud ]; then RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm') package_cloud push "${PCIO_CO}/${STREAM}/el/${FACTER_OSMAJREL}/os/${FACTER_ARCH}/" ${RPMS} ;; - OpenSuSE) - FACTER_OSREL=$(/usr/bin/facter operatingsystemrelease) + openSUSE) + # Use /etc/os-release on openSUSE to get $VERSION + . /etc/os-release RPMS=$(find . -type f -iregex '.*/.*\.\(s\)?rpm') - package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${FACTER_OSREL}/" ${RPMS} + package_cloud push "${PCIO_CO}/${STREAM}/opensuse/${VERSION}/" ${RPMS} ;; esac fi -- cgit 1.2.3-korg