Commit cd34b3d4 authored by Jakub Sztandera's avatar Jakub Sztandera

Do not install gx unless user asks for it

Build scripts should never touch user's environment.
This patch intoduces existance and version check for gx and gx-go
Prints nice error message if they are missing or outdated.

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@gmail.com>
parent 694f22a4
......@@ -13,7 +13,9 @@ env:
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_go_expensive
- TEST_NO_FUSE=1 TEST_VERBOSE=1 TEST_SUITE=test_sharness_expensive
install: make install
install:
- make toolkit_upgrade
- make install
script:
- make $TEST_SUITE
......
......@@ -14,11 +14,19 @@ all: help
godep:
go get github.com/tools/godep
gx:
toolkit_upgrade: gx_upgrade gxgo_upgrade
gx_upgrade:
go get -u github.com/whyrusleeping/gx
gxgo_upgrade:
go get -u github.com/whyrusleeping/gx-go
deps: gx
gx_check:
@bin/check_gx_program "gx" "0.3" 'Upgrade or install gx using your package manager or run `make gx_upgrade`'
@bin/check_gx_program "gx-go" "0.2" 'Upgrade or install gx-go using your package manager or run `make gxgo_upgrade`'
deps: gx_check
gx --verbose install --global
# saves/vendors third-party dependencies to Godeps/_workspace
......@@ -42,7 +50,7 @@ clean:
uninstall:
cd cmd/ipfs && go clean -i -ldflags=$(ldflags)
PHONY += all help godep install build nofuse clean uninstall
PHONY += all help godep toolkit_upgrade gx_upgrade gxgo_upgrade gx_check deps vendor install build nofuse clean uninstall
##############################################################
# tests targets
......@@ -98,6 +106,7 @@ PHONY += test test_short test_expensive
help:
@echo 'DEPENDENCY TARGETS:'
@echo ''
@echo ' deps - Download dependencies using gx'
@echo ' vendor - Create a Godep workspace of 3rd party dependencies'
@echo ''
@echo 'BUILD TARGETS:'
......
......@@ -40,7 +40,7 @@ install:
# default file handles. Ensure a dummy file descriptor is opened with 'exec'.
#
build_script:
- '%BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; export PATH=$GOPATH/bin:$PATH; make nofuse"'
- '%BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; export PATH=$GOPATH/bin:$PATH; make toolkit_upgrade; make nofuse"'
test_script:
- '%BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; export PATH=$GOPATH/bin:$PATH; export GOFLAGS=''-tags nofuse''; export TEST_NO_FUSE=1; export TEST_VERBOSE=1; export TEST_SUITE=test_sharness_expensive; make $TEST_SUITE"'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment