Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide upgrade choices for stable and testing #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ using the following command-line::

vagga _box upgrade_vagga

By default the command above will upgrade to the latest stable vagga version. If
you want to upgrade to the latest testing version of vagga pass
:code:`--testing` argument to the command::

vagga _box upgrade_vagga --testing

Short FAQ
=========
Expand Down
17 changes: 16 additions & 1 deletion image/http/upgrade-vagga.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
#!/bin/sh
curl -sfS http://files.zerogw.com/vagga/vagga-install-testing.sh | sh

case "$1" in
# If no arguments provided update to the latest stable version
''|--stable)
install_script="vagga-install.sh"
;;
--testing)
install_script="vagga-install-testing.sh"
;;
*)
echo 'Specify one of "--stable", "--testing"' >&2
exit 1
;;
esac

curl -sfS "http://files.zerogw.com/vagga/${install_script}" | sh
4 changes: 3 additions & 1 deletion vagga_box/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ def main():
virtualbox.stop_vm()
return sys.exit(0)
elif args.command[1:2] == ['upgrade_vagga']:
upgrade_mode = args.command[2:3]
upgarde_cmd = ['/usr/local/bin/upgrade-vagga'] + upgrade_mode
returncode = subprocess.Popen(
BASE_SSH_COMMAND + ['/usr/local/bin/upgrade-vagga'],
BASE_SSH_COMMAND + upgarde_cmd
).wait()
return sys.exit(returncode)
elif args.command[1:2] == ['mount']:
Expand Down