9 Commits
Author SHA1 Message Date
Joshua B. Bussdieker e5a06b52c7 Bump version to 1.0.22 2014-08-04 08:37:08 -07:00
Joshua Bussdieker 51d149771f Merge pull request #94 from meatballhat/scenario-tests-on-travis
Trying to run both default and scenario tests on Travis
2014-08-04 08:35:47 -07:00
Joshua Bussdieker eb61d9dbd0 Merge pull request #96 from runcom/zsh_installer_compatibility
Edit gvm-installer to be compatible with zsh
2014-08-04 08:32:51 -07:00
Antonio Murdaca 7fc9e0ef22 Edit gvm-installer to be compatible with zsh 2014-08-03 22:53:03 +02:00
Dan Buch 03d7843f69 Trying to run both default and scenario tests on Travis
* Aborting rake tests if subshells fail plus attempting to make
gvm-installer less destructive for easing local verification of the
tests that run on Travis.
* Getting rubocop happy with the Rakefile, collapsing things a bit
2014-07-22 10:38:47 -04:00
Joshua Bussdieker ac17654314 Merge pull request #91 from kainosnoema/fix/download-url
Fix invalid download paths preventing install
2014-07-21 22:18:35 -07:00
Evan Owen fb0881a609 Fix indentation everywhere
Signed-off-by: Evan Owen <kainosnoema@gmail.com>
2014-07-21 22:14:04 -07:00
Evan Owen f9b3d1699d Replace go.googlecode.com fallback with storage.googleapis.com
go.googlecode.com no longer works, storage.googleapis.com does.

Signed-off-by: Evan Owen <kainosnoema@gmail.com>
2014-07-21 22:12:07 -07:00
Evan Owen b3ac750c04 Remove extra 'go' from download URL path
GO_BINARY_FILE already contains the full "go1.3..." path.

Signed-off-by: Evan Owen <kainosnoema@gmail.com>
2014-07-21 22:12:07 -07:00
7 changed files with 67 additions and 42 deletions
+7 -2
View File
@@ -1,7 +1,12 @@
language: c
os: [linux, osx]
osx_image: mavericks
env:
global:
- SRC_REPO=$TRAVIS_BUILD_DIR
- GVM_NO_GIT_BAK=1
- GVM_NO_UPDATE_PROFILE=1
before_install:
- "binscripts/gvm-installer $TRAVIS_COMMIT $TRAVIS_BUILD_DIR/tmp"
- binscripts/gvm-installer $TRAVIS_COMMIT $TRAVIS_BUILD_DIR/tmp
install: gem install tf -v '>=0.4.1'
script: source $TRAVIS_BUILD_DIR/tmp/gvm/scripts/gvm; tf --text tests/*.sh
script: source $TRAVIS_BUILD_DIR/tmp/gvm/scripts/gvm; rake default scenario
+2
View File
@@ -25,6 +25,8 @@ To install:
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
Or if you are using zsh just change `bash` with `zsh`
Installing Go
=============
gvm install go1
+2
View File
@@ -28,6 +28,8 @@ To install:
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
Or if you are using zsh just change `bash` with `zsh`
Installing Go
=============
gvm install go1
+28 -14
View File
@@ -1,27 +1,41 @@
require 'tmpdir'
def root_path
File.expand_path('../.', __FILE__)
end
def commit
@commit ||= (
ENV['TRAVIS_COMMIT'] || `git rev-parse --abbrev-ref HEAD`.chomp
)
end
task :default do
root_path = File.expand_path "../.", __FILE__
Dir.mktmpdir("gvm-test") do |tmpdir|
puts `binscripts/gvm-installer binary_default #{tmpdir}`
pid = fork do
exec("bash -c 'source #{tmpdir}/gvm/scripts/gvm; tf --text #{tmpdir}/gvm/tests/*.sh'")
end
Process.waitpid(pid)
Dir.mktmpdir('gvm-test') do |tmpdir|
system(<<-EOSH) || fail
bash -c '
set -e
#{root_path}/binscripts/gvm-installer #{commit} #{tmpdir}
source #{tmpdir}/gvm/scripts/gvm
tf --text #{tmpdir}/gvm/tests/*.sh
'
EOSH
end
end
task :scenario do
root_path = File.expand_path "../.", __FILE__
Dir["#{root_path}/tests/scenario/*_comment_test.sh"].each do |test|
name = File.basename(test)
puts "Running scenario #{name}..."
Dir.mktmpdir("gvm-test") do |tmpdir|
install = `binscripts/gvm-installer binary_default #{tmpdir}`
pid = fork do
exec("bash -c 'source #{tmpdir}/gvm/scripts/gvm; tf --text #{tmpdir}/gvm/tests/scenario/#{name}'")
end
Process.waitpid(pid)
Dir.mktmpdir('gvm-test') do |tmpdir|
system(<<-EOSH) || fail
bash -c '
set -e
#{root_path}/binscripts/gvm-installer #{commit} #{tmpdir}
source #{tmpdir}/gvm/scripts/gvm
tf --text #{tmpdir}/gvm/tests/scenario/#{name}
'
EOSH
end
end
end
+1 -1
View File
@@ -1 +1 @@
1.0.21
1.0.22
+12 -10
View File
@@ -19,7 +19,7 @@ update_profile() {
check_existing_go() {
if [ "$GOROOT" == "" ]; then
if [ "$GOROOT" = "" ]; then
if which go > /dev/null; then
GOROOT=$(go env | grep GOROOT | cut -d"=" -f2)
else
@@ -60,7 +60,7 @@ SRC_REPO=${SRC_REPO:-https://github.com/moovweb/gvm.git}
# Is gvm-installer being called from the origin repo?
# If so, skip the clone and source locally!
# This prevents, the CI to break on non-merge commits
# This prevents CI from breaking on non-merge commits.
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
@@ -87,20 +87,22 @@ cd "$GVM_DEST/$GVM_NAME" && git checkout --quiet "$BRANCH" 2> /dev/null || displ
popd > /dev/null
mv "$GVM_DEST/$GVM_NAME/.git" "$GVM_DEST/$GVM_NAME/git.bak"
[ -z "$GVM_NO_GIT_BAK" ] && mv "$GVM_DEST/$GVM_NAME/.git" "$GVM_DEST/$GVM_NAME/git.bak"
source_line="[[ -s \"${GVM_DEST}/$GVM_NAME/scripts/gvm\" ]] && source \"${GVM_DEST}/$GVM_NAME/scripts/gvm\""
source_file="${GVM_DEST}/$GVM_NAME/scripts/gvm"
if [ -n "$ZSH_NAME" ]; then
update_profile "$HOME/.zshrc"
elif [ "$(uname)" == "Linux" ]; then
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
elif [ "$(uname)" == "Darwin" ]; then
update_profile "$HOME/.profile" || update_profile "$HOME/.bash_profile"
if [ -z "$GVM_NO_UPDATE_PROFILE" ] ; then
if [ -n "$ZSH_NAME" ]; then
update_profile "$HOME/.zshrc"
elif [ "$(uname)" == "Linux" ]; then
update_profile "$HOME/.bashrc" || update_profile "$HOME/.bash_profile"
elif [ "$(uname)" == "Darwin" ]; then
update_profile "$HOME/.profile" || update_profile "$HOME/.bash_profile"
fi
fi
if [ "$?" != "0" ]; then
if [ -z "$GVM_NO_UPDATE_PROFILE" ] && [ "$?" != "0" ]; then
echo "Unable to locate profile settings file(Something like $HOME/.bashrc or $HOME/.bash_profile)"
echo
echo " You will have to manually add the following line:"
+15 -15
View File
@@ -39,9 +39,9 @@ read_command_line() {
-B|--binary)
INSTALL_SOURCE="binary"
;;
--prefer-binary)
INSTALL_SOURCE="prefer-binary"
;;
--prefer-binary)
INSTALL_SOURCE="prefer-binary"
;;
-h|--help)
show_usage
exit 0
@@ -164,13 +164,13 @@ download_binary() {
exit 1
fi
else
GVM_OS="linux"
GVM_OS="linux"
fi
if [ "$(uname -m)" == "x86_64" ]; then
GVM_ARCH="amd64"
GVM_ARCH="amd64"
else
GVM_ARCH="386"
GVM_ARCH="386"
fi
GO_BINARY_FILE=${VERSION}.${GVM_OS}-${GVM_ARCH}${GVM_OS_VERSION}.tar.gz
@@ -181,17 +181,17 @@ download_binary() {
curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH}
if [[ $? -ne 0 ]]; then
display_error "Failed to download binary go from http://golang.org. Trying https://go.googlecode.com"
GO_BINARY_URL="https://go.googlecode.com/files/go${GO_BINARY_FILE}"
display_error "Failed to download binary go from http://golang.org. Trying https://storage.googleapis.com"
GO_BINARY_URL="https://storage.googleapis.com/golang/${GO_BINARY_FILE}"
curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH}
curl -s -f -L $GO_BINARY_URL > ${GO_BINARY_PATH}
if [[ $? -ne 0 ]]; then
display_error "Failed to download binary go"
rm -rf $GO_INSTALL_ROOT
rm -f $GO_BINARY_PATH
exit 1
fi
if [[ $? -ne 0 ]]; then
display_error "Failed to download binary go"
rm -rf $GO_INSTALL_ROOT
rm -f $GO_BINARY_PATH
exit 1
fi
fi
fi