Skip to content

Commit

Permalink
Versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Berhent committed Aug 10, 2022
1 parent 704b6af commit ffa2e8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/client/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ BINARY="boompow-client"

if [ $? == 0 ]; then
if [ "${GOOS}" == "windows" ]; then
go build -o ${BINARY}.exe -tags cl -ldflags "-X main.WSUrl=wss://boompow.banano.cc/ws/worker -X main.GraphQLURL=https://boompow.banano.cc/graphql" .
go build -o ${BINARY}.exe -tags cl -ldflags "-X main.WSUrl=wss://boompow.banano.cc/ws/worker -X main.GraphQLURL=https://boompow.banano.cc/graphql -X main.Version=`git tag --sort=-version:refname | head -n 1`" .
else
go build -o ${BINARY} -tags cl -ldflags "-X main.WSUrl=wss://boompow.banano.cc/ws/worker -X main.GraphQLURL=https://boompow.banano.cc/graphql" .
go build -o ${BINARY} -tags cl -ldflags "-X main.WSUrl=wss://boompow.banano.cc/ws/worker -X main.GraphQLURL=https://boompow.banano.cc/graphql -X main.Version=`git tag --sort=-version:refname | head -n 1`" .
fi
fi
7 changes: 7 additions & 0 deletions apps/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
// Variables
var GraphQLURL = "http://localhost:8080/graphql"
var WSUrl = "ws://localhost:8080/ws/worker"
var Version = "dev"

// For pretty text
func printBanner() {
Expand Down Expand Up @@ -144,9 +145,15 @@ func main() {
registerService := flag.Bool("register-service", false, "Register to be a service/work requester (optional)")
resendConfirmationEmail := flag.Bool("resend-confirmation-email", false, "Resend the confirmation email (optional)")
generateServiceToken := flag.Bool("generate-service-token", false, "Generate a service token (optional)")
version := flag.Bool("version", false, "Display the version")
flag.Parse()
NConcurrentWorkers = *threadCount

if *version {
fmt.Printf("BoomPOW version: %s\n", Version)
os.Exit(0)
}

printBanner()

gpuInfo, err := getGPUInfo()
Expand Down

0 comments on commit ffa2e8a

Please sign in to comment.