Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Update snap build scripts #1027

Merged
merged 3 commits into from
Jul 1, 2016
Merged

Update snap build scripts #1027

merged 3 commits into from
Jul 1, 2016

Conversation

nanliu
Copy link
Contributor

@nanliu nanliu commented Jun 24, 2016

  • make SNAP_PATH optional.
  • remove options around build-plugins.
  • fix docker test so it works regardless of directory.
  • simplify travis.ci config.

@nanliu nanliu force-pushed the scripts branch 5 times, most recently from 9399ef1 to a1854e0 Compare June 24, 2016 23:42
_debug "script directory ${__dir}"
_debug "project directory ${__proj_dir}"

[[ "$SNAP_TEST_TYPE" =~ ^(small|medium|large|legacy)$ ]] || _error "invalid TEST_TYPE (value must be 'small', 'medium', 'large', or 'legacy', recieved:${SNAP_TEST_TYPE}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should say "Invalid SNAP_TEST_TYPE", though should a different error be thrown if SNAP_TEST_TYPE is not set?

And at the end of the line, recieved -> received.

@nanliu
Copy link
Contributor Author

nanliu commented Jun 28, 2016

@geauxvirtual updated error message per request.

@geauxvirtual
Copy link
Contributor

When running tests, seeing this in the output. A message is displayed goimports is not found. It doesn't stop from running other commands, not sure if we want that behavior though.

2016-06-30 16:56:00 UTC [     info] running goimports
/home/pulse/test991/src/github.com/intelsdi-x/snap/scripts/common.sh: line 82: goimports: command not found


_goimports() {
_go_get golang.org/x/tools/cmd/goimports
test -z "$(goimports -l -d $(find . -type f -name '*.go' -not -path "./vendor/*") | tee /dev/stderr)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably prefix any tool that is grabbed via go get with $GOPATH/bin so the tool can be run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the test script to verify the path at the start, so we don't need to check the path later on per command. Also seems like our current test is missing folders since gofmt didn't catch errors in plugins dir.

@nanliu nanliu force-pushed the scripts branch 3 times, most recently from 504a798 to 9e9ee44 Compare June 30, 2016 18:29
glide)
_go_get github.com/Masterminds/glide
;;
govendor)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only other comment I have would be to remove glide and govendor from install_go_dep and restore_go_dep and reintroduce glide with the other PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, that's all cleanup and removed now.

@nanliu nanliu force-pushed the scripts branch 2 times, most recently from fbc525c to 7e09842 Compare July 1, 2016 02:10
nanliu added 3 commits June 30, 2016 19:55
* make SNAP_PATH optional.
* remove options around build-plugins.
* use test as branch name when checking out git ref.
* fix docker test so it works regardless of directory.
* simplify travis.ci config.
@nanliu
Copy link
Contributor Author

nanliu commented Jul 1, 2016

+1 Per discussion with Justin

@pittma pittma merged commit cc4eda7 into intelsdi-x:master Jul 1, 2016
mkleina pushed a commit to mkleina/snap that referenced this pull request Jul 4, 2016
* gofmt is asleep at the wheel in current test.

* Update snap build scripts

* make SNAP_PATH optional.
* remove options around build-plugins.
* use test as branch name when checking out git ref.
* fix docker test so it works regardless of directory.
* simplify travis.ci config.

* Make sure gopath and path configured correctly.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants