summaryrefslogtreecommitdiffstats
path: root/.github/scripts
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2021-03-25 15:08:19 -0400
committerGitHub <noreply@github.com>2021-03-25 15:08:19 -0400
commitf3881e1cd1d2e67275ea4a66760c742b14ac430a (patch)
tree414f4b5fc5c8a05ec2a02a63584c0f846c5a7f2a /.github/scripts
parent5a815b1b1f9d7fa7f9aab19be8feab8ece3d900a (diff)
Fix handling of binary package uploads. (#10860)
Diffstat (limited to '.github/scripts')
-rwxr-xr-x.github/scripts/package_cloud_wrapper.sh2
-rwxr-xr-x.github/scripts/parse_packagecloud_dist_id.py39
2 files changed, 1 insertions, 40 deletions
diff --git a/.github/scripts/package_cloud_wrapper.sh b/.github/scripts/package_cloud_wrapper.sh
index 0876b2a363..7640ef484d 100755
--- a/.github/scripts/package_cloud_wrapper.sh
+++ b/.github/scripts/package_cloud_wrapper.sh
@@ -29,7 +29,7 @@ fi
# Install dependency if not there
if ! command -v package_cloud > /dev/null 2>&1; then
echo "No package cloud gem found, installing"
- gem install -V package_cloud || (echo "Package cloud installation failed. you might want to check if required dependencies are there (ruby gcc gcc-c++ ruby-devel)" && exit 1)
+ sudo gem install -V package_cloud || (echo "Package cloud installation failed. you might want to check if required dependencies are there (ruby gcc gcc-c++ ruby-devel)" && exit 1)
else
echo "Found package_cloud gem, continuing"
fi
diff --git a/.github/scripts/parse_packagecloud_dist_id.py b/.github/scripts/parse_packagecloud_dist_id.py
deleted file mode 100755
index 55ddf4bec5..0000000000
--- a/.github/scripts/parse_packagecloud_dist_id.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/usr/bin/env python3
-'''
-Parse the PackageCloud distributions JSON data to get a dist ID for uploads.
-
-This takes the JSON distributions data from Packagecloud on stdin and
-the package format, distribution name and version as arguments, and
-prints either an error message or the parsed distribution ID based on
-the arguments.
-'''
-
-import json
-import sys
-
-fmt = sys.argv[1] # The package format ('deb' or 'rpm')
-distro = sys.argv[2] # The distro name
-version = sys.argv[3] # The distro version
-print(fmt)
-print(distro)
-print(version)
-
-data = json.load(sys.stdin)
-versions = []
-
-for entry in data[fmt]:
- if entry['display_name'] == distro:
- versions = entry['versions']
- break
-
-if not versions:
- print('Could not find version information for the requested distribution.')
- sys.exit(-1)
-
-for entry in versions:
- if entry['version_number'] == version:
- print(entry['id'])
- sys.exit(0)
-
-print('Unable to find id for requested version.')
-sys.exit(-1)