forked from pulp/pulp_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_ruby_client.sh
More file actions
executable file
·42 lines (33 loc) · 1.34 KB
/
Copy pathinstall_ruby_client.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulp_python' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
set -mveuo pipefail
# make sure this script runs at the repo root
cd "$(dirname "$(realpath -e "$0")")"/../../..
source .github/workflows/scripts/utils.sh
PULP_URL="${PULP_URL:-https://pulp}"
export PULP_URL
PULP_API_ROOT="${PULP_API_ROOT:-/pulp/}"
export PULP_API_ROOT
REPORTED_STATUS="$(pulp status)"
REPORTED_VERSION="$(echo "$REPORTED_STATUS" | jq --arg plugin "python" -r '.versions[] | select(.component == $plugin) | .version')"
VERSION="$(echo "$REPORTED_VERSION" | python -c 'from packaging.version import Version; print(Version(input()))')"
pushd ../pulp-openapi-generator
rm -rf pulp_python-client
if pulp debug has-plugin --name "core" --specifier ">=3.44.0.dev"
then
curl --fail-with-body -k -o api.json "${PULP_URL}${PULP_API_ROOT}api/v3/docs/api.json?bindings&component=python"
USE_LOCAL_API_JSON=1 ./generate.sh pulp_python ruby "$VERSION"
else
./generate.sh pulp_python ruby "$VERSION"
fi
pushd pulp_python-client
gem build pulp_python_client
gem install --both "./pulp_python_client-$VERSION.gem"
tar cvf ../../pulp_python/python-ruby-client.tar "./pulp_python_client-$VERSION.gem"
popd
popd