Merge commit 'ca9e0387d063905e681e44a3fbd2ddf1b1682f91' into tools-with-shellcheck

Update for shell-lint review tweaks
This commit is contained in:
Jonathan Lange
2016-07-12 18:07:42 +01:00
3 changed files with 2 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ has_changes() {
local rev1=$1
local rev2=$2
local changes
changes=$(git diff --oneline "$rev1..$rev2" -- "${INPUTFILES[@]}" | wc -l)
changes=$(git diff --oneline "$rev1..$rev2" -- "${INPUTFILES[@]}" | wc -l)
[ "$changes" -gt 0 ]
}

View File

@@ -155,18 +155,15 @@ func getSchedule(tests []string) ([]string, error) {
shardID = os.Getenv("CIRCLE_NODE_INDEX")
requestBody = &bytes.Buffer{}
)
fmt.Printf("getSchedule: %v", tests)
if err := json.NewEncoder(requestBody).Encode(schedule{tests}); err != nil {
return []string{}, err
}
url := fmt.Sprintf("http://%s/schedule/%s/%s/%s", schedulerHost, testRun, shardCount, shardID)
fmt.Printf("POSTing to %v: %v", url, requestBody)
resp, err := http.Post(url, jsonContentType, requestBody)
if err != nil {
return []string{}, err
}
var sched schedule
fmt.Printf("Got response: %v", resp.Body)
if err := json.NewDecoder(resp.Body).Decode(&sched); err != nil {
return []string{}, err
}

View File

@@ -14,7 +14,7 @@ PROXY_CONTAINER=$(ssh "$HOST" weave run -d weaveworks/socksproxy)
function finish {
echo "Removing proxy container.."
# shellcheck disable=SC2029
# shellcheck disable=SC2029
ssh "$HOST" docker rm -f "$PROXY_CONTAINER"
}
trap finish EXIT