mirror of
https://github.com/microsoft/ethr.git
synced 2024-09-20 06:46:14 +08:00
Fix binary generation for builds (#89)
* Fix the binary building script for TravisCI builds * Goimports code linting fixes
This commit is contained in:
parent
2f83ae6fb3
commit
82c8007bd9
|
@ -581,7 +581,7 @@ func runHTTPandHTTPSHandler(w http.ResponseWriter, r *http.Request, p EthrProtoc
|
|||
http.Error(w, "Only GET, PUT and POST are supported.", http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
if (testType == Bandwidth) {
|
||||
if testType == Bandwidth {
|
||||
if r.ContentLength > 0 {
|
||||
atomic.AddUint64(&test.testResult.data, uint64(r.ContentLength))
|
||||
}
|
||||
|
@ -602,4 +602,4 @@ func runHTTPLatencyServer() {
|
|||
|
||||
func runHTTPLatencyHandler(w http.ResponseWriter, r *http.Request) {
|
||||
runHTTPandHTTPSHandler(w, r, HTTP, Latency)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ func (u *serverTui) emitLatencyResults(remote, proto string, avg, min, max, p50,
|
|||
func (u *serverTui) paint(seconds uint64) {
|
||||
tm.Clear(tm.ColorDefault, tm.ColorDefault)
|
||||
defer tm.Flush()
|
||||
printCenterText(0, 0, u.w, "Ethr " + gVersion, tm.ColorBlack, tm.ColorWhite)
|
||||
printCenterText(0, 0, u.w, "Ethr "+gVersion, tm.ColorBlack, tm.ColorWhite)
|
||||
printHLineText(u.resX, u.resY-1, u.resW, "Test Results")
|
||||
printHLineText(u.statX, u.statY-1, u.statW, "Statistics")
|
||||
printVLine(u.topVSplitX, u.topVSplitY, u.topVSplitH)
|
||||
|
|
3
travis_build.sh
Normal file → Executable file
3
travis_build.sh
Normal file → Executable file
|
@ -1,8 +1,7 @@
|
|||
#!/bin/bash
|
||||
echo $TRAVIS_OS_NAME
|
||||
echo "${TRAVIS_OS_NAME}"
|
||||
echo "${TRAVIS_GO_VERSION}"
|
||||
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [[ ${TRAVIS_GO_VERSION} == 1.11* ]]; then
|
||||
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
|
||||
export GOOS=windows
|
||||
export GOARCH=amd64
|
||||
go build -o windows/ethr.exe -ldflags "-X main.gVersion=$TRAVIS_TAG"
|
||||
|
|
Loading…
Reference in a new issue