Skip to content

Commit

Permalink
Fixing docs scripts
Browse files Browse the repository at this point in the history
fixes #8216
  • Loading branch information
David Davis authored and fao89 committed Feb 11, 2021
1 parent e09fee3 commit 46a1525
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGES/8216.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed docs scripts.
2 changes: 1 addition & 1 deletion docs/_scripts/distribution_repo_version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Distributions are created asynchronously. Create one, and specify the repository version that will
# be served at the base path specified.
pulp ansible distribution create --name "baz" --base-path "my_content" --repository "foo" --version 1
pulp ansible distribution create --name "bar" --base-path "some_content" --repository "foo" --version 0
25 changes: 14 additions & 11 deletions docs/_scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Install from PyPI
pip install pulp-cli[pygments] # colorized output
pip install pulp-cli # no color output
#!/usr/bin/env bash
set -e

# Install from source
git clone https://github.com/pulp/pulp-cli.git # or your fork url
cd pulp-cli
pip install -e .
cd ..
export BASE_ADDR=${BASE_ADDR:-http://pulp:80}

if [ -z "$(pip freeze | grep pulp-cli)" ]; then
echo "Installing pulp-cli"
pip install pulp-cli[pygments]
fi

# Set up CLI config file
mkdir ~/.config/pulp
cat > ~/.config/pulp/settings.toml << EOF
if [ ! -f ~/.config/pulp/settings.toml ]; then
echo "Configuring pulp-cli"
mkdir ~/.config/pulp
cat > ~/.config/pulp/settings.toml << EOF
[cli]
base_url = "http://pulp:80" # common to be localhost
base_url = "$BASE_ADDR"
verify_ssl = false
format = "json"
EOF
fi
2 changes: 1 addition & 1 deletion docs/_scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pulp ansible repository sync --name "foo" --remote "bar"

# After the task is complete, it gives us a new repository version
# Inspecting new repository version
pulp ansible repository version show --repository "foo"
pulp ansible repository version show --repository "foo" --version 1

0 comments on commit 46a1525

Please sign in to comment.