diff --git a/build/build b/build/build index b705d1f..5dddbf9 100755 --- a/build/build +++ b/build/build @@ -12,7 +12,7 @@ fi source $SCRIPTPATH/oauth_client.env NAME=mixcloud -VERSION=0.5 +VERSION=0.5.1 MINVERSION=`date -u +%Y%m%d%.H%M%S` LDFLAGS="-s -w -X main.MINVERSION ${MINVERSION} -X main.VERSION ${VERSION} -X main.OAUTH_CLIENT_ID ${OAUTH_CLIENT_ID} -X main.OAUTH_CLIENT_SECRET ${OAUTH_CLIENT_SECRET}" OUTFILE=pkg/${VERSION}/${NAME} diff --git a/mixcloud.go b/mixcloud.go index d783084..dc1d2ec 100644 --- a/mixcloud.go +++ b/mixcloud.go @@ -10,6 +10,7 @@ import ( "github.com/ruxton/mixcloud/confirm" "github.com/ruxton/mixcloud/mixcloud" "github.com/ruxton/mixcloud/term" + "github.com/mattn/go-colorable" "io" flag "launchpad.net/gnuflag" "mime/multipart" @@ -44,8 +45,8 @@ var fileFlag = flag.String("file", "", "The mp3 file to upload to mixcloud") var coverFlag = flag.String("cover", "", "The image file to upload to mixcloud as the cover") var trackListFlag = flag.String("tracklist", "", "A file containing a VirtualDJ Tracklist for the cloudcast") -var STD_OUT = bufio.NewWriter(os.Stdout) -var STD_ERR = bufio.NewWriter(os.Stderr) +var STD_OUT = bufio.NewWriter(colorable.NewColorableStdout()) +var STD_ERR = bufio.NewWriter(colorable.NewColorableStderr()) var STD_IN = bufio.NewReader(os.Stdin) type Configuration struct {