Skip to content

Commit

Permalink
Add a command to generate the install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Dec 21, 2023
1 parent 70b0e9b commit c5a445e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .plano.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ def _update_release_data(output_dir):

write_json(output_file, data)

@command
def generate_install_scripts(output_dir="input"):
install_script = http_get("https://raw.githubusercontent.com/skupperproject/skupper-install-script/main/install.sh")
uninstall_script = http_get("https://raw.githubusercontent.com/skupperproject/skupper-install-script/main/uninstall.sh")

write(f"{output_dir}/staging/install.sh", install_script)
write(f"{output_dir}/staging/uninstall.sh", uninstall_script)

@command
def test():
render()
Expand All @@ -192,6 +200,7 @@ def test():
with temp_dir() as temp:
with working_env(HOME=temp):
run("cat docs/staging/install.sh | sh", shell=True)
run("cat docs/staging/uninstall.sh | sh", shell=True)

generate_docs(output_dir=temp)
generate_examples(output_dir=temp)
Expand Down
3 changes: 1 addition & 2 deletions docs/staging/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# under the License.
#

site_url="https://skupper.io"
troubleshooting_url="https://skupper.io/install/troubleshooting.html"

# Make the local keyword work with ksh93 and POSIX-style functions
Expand Down Expand Up @@ -567,7 +566,7 @@ main() {
print
print "To uninstall Skupper, use:"
print
print " curl ${site_url}/uninstall.sh | sh"
print " curl https://skupper.io/uninstall.sh | sh"
print
} >&6 2>&6
}
Expand Down
7 changes: 3 additions & 4 deletions docs/staging/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
# under the License.
#

site_url="https://raw.githubusercontent.com/skupperproject/skupper-install-script/main"
troubleshooting_url="https://github.com/skupperproject/skupper-install-script/blob/main/troubleshooting.md"
troubleshooting_url="https://skupper.io/install/troubleshooting.html"

# Make the local keyword work with ksh93 and POSIX-style functions
case "${KSH_VERSION:-}" in
Expand Down Expand Up @@ -271,7 +270,7 @@ usage() {
cat <<EOF
Usage: ${0} [-hvy] [-s <scheme>]
A script that uninstalls ActiveMQ Artemis
A script that uninstalls the Skupper command-line tool
Options:
-h Print this help text and exit
Expand Down Expand Up @@ -396,7 +395,7 @@ main() {
print
print "To install Skupper again, use:"
print
print " curl ${site_url}/install.sh | sh"
print " curl https://skupper.io/install.sh | sh"
print
} >&6 2>&6
}
Expand Down
3 changes: 1 addition & 2 deletions input/staging/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# under the License.
#

site_url="https://skupper.io"
troubleshooting_url="https://skupper.io/install/troubleshooting.html"

# Make the local keyword work with ksh93 and POSIX-style functions
Expand Down Expand Up @@ -567,7 +566,7 @@ main() {
print
print "To uninstall Skupper, use:"
print
print " curl ${site_url}/uninstall.sh | sh"
print " curl https://skupper.io/uninstall.sh | sh"
print
} >&6 2>&6
}
Expand Down
7 changes: 3 additions & 4 deletions input/staging/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
# under the License.
#

site_url="https://raw.githubusercontent.com/skupperproject/skupper-install-script/main"
troubleshooting_url="https://github.com/skupperproject/skupper-install-script/blob/main/troubleshooting.md"
troubleshooting_url="https://skupper.io/install/troubleshooting.html"

# Make the local keyword work with ksh93 and POSIX-style functions
case "${KSH_VERSION:-}" in
Expand Down Expand Up @@ -271,7 +270,7 @@ usage() {
cat <<EOF
Usage: ${0} [-hvy] [-s <scheme>]
A script that uninstalls ActiveMQ Artemis
A script that uninstalls the Skupper command-line tool
Options:
-h Print this help text and exit
Expand Down Expand Up @@ -396,7 +395,7 @@ main() {
print
print "To install Skupper again, use:"
print
print " curl ${site_url}/install.sh | sh"
print " curl https://skupper.io/install.sh | sh"
print
} >&6 2>&6
}
Expand Down

0 comments on commit c5a445e

Please sign in to comment.