Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlong committed Aug 15, 2018
1 parent e460f63 commit 35f1c7f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 26 deletions.
37 changes: 19 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,24 @@ tag:
git tag "v$(VERSION)" --force

compress:
mv build/alpine-linux-amd64 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-linux-alpine.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
mv build/cmd-darwin-10.6-amd64 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-osx-x64.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
mv build/cmd-darwin-10.6-386 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-osx-x32.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
mv build/cmd-linux-amd64 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-linux-x64.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
mv build/cmd-linux-386 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-linux-x32.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
mv build/cmd-windows-6.0-amd64.exe build/$(BINARY_NAME).exe
zip build/$(BINARY_NAME)-windows-x64.zip build/$(BINARY_NAME).exe && rm -f build/$(BINARY_NAME).exe
mv build/cmd-windows-6.0-386.exe build/$(BINARY_NAME).exe
zip build/$(BINARY_NAME)-windows-x32.zip build/$(BINARY_NAME).exe && rm -f build/$(BINARY_NAME).exe
mv build/cmd-linux-arm-7 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-linux-arm7.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
mv build/cmd-linux-arm64 build/$(BINARY_NAME)
tar -czvf build/$(BINARY_NAME)-linux-arm64.tar.gz build/$(BINARY_NAME) && rm -f build/$(BINARY_NAME)
cd build
mv alpine-linux-amd64 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-linux-alpine.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
mv cmd-darwin-10.6-amd64 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-osx-x64.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
mv cmd-darwin-10.6-386 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-osx-x32.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
mv cmd-linux-amd64 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-linux-x64.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
mv cmd-linux-386 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-linux-x32.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
mv cmd-windows-6.0-amd64.exe $(BINARY_NAME).exe
zip $(BINARY_NAME)-windows-x64.zip $(BINARY_NAME).exe && rm -f $(BINARY_NAME).exe
mv cmd-windows-6.0-386.exe $(BINARY_NAME).exe
zip $(BINARY_NAME)-windows-x32.zip $(BINARY_NAME).exe && rm -f $(BINARY_NAME).exe
mv cmd-linux-arm-7 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-linux-arm7.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)
mv cmd-linux-arm64 $(BINARY_NAME)
tar -czvf $(BINARY_NAME)-linux-arm64.tar.gz $(BINARY_NAME) && rm -f $(BINARY_NAME)

.PHONY: build test
18 changes: 10 additions & 8 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ func main() {
}
}


type commandArgs struct {
cli.Helper
Geth string `cli:"*g,geth" usage:"attach geth IPC or HTTP location" dft:"https://eth.coinapp.io"`
IP string `cli:"ip" usage:"Bind to IP Address" dft:"0.0.0.0"`
Port int `cli:"p,port" usage:"HTTP server port for token information in JSON" dft:"8080"`
Logs bool `cli:"l,logs" usage:"Output logs on each transaction" dft:"true"`
}

var help = cli.HelpCommand("display help information")

type rootT struct {
Expand Down Expand Up @@ -53,7 +62,7 @@ var startCommand = &cli.Command{
argv := ctx.Argv().(*commandArgs)
configs = &tb.Config{
GethLocation: argv.Geth,
Logs: true,
Logs: argv.Logs,
}
err := configs.Connect()
if err != nil {
Expand All @@ -73,13 +82,6 @@ var versionCommand = &cli.Command{
},
}

type commandArgs struct {
cli.Helper
Geth string `cli:"*g,geth" usage:"attach geth IPC or HTTP location"`
IP string `cli:"ip" usage:"Bind to IP Address" dft:"0.0.0.0"`
Port int `cli:"p,port" usage:"HTTP server port for token information in JSON" dft:"8080"`
}

type errorResponse struct {
Error bool `json:"error"`
Message string `json:"message"`
Expand Down

0 comments on commit 35f1c7f

Please sign in to comment.