File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -68,12 +68,13 @@ func main() {
6868}
6969```
7070
71-
7271### 2. Build Your Application
7372
7473Build your application with a specific version by following these requirements:
74+
7575- Use the LDFLAGS ` -X ` flag to set the version at build time
7676- Include the version in the output filename (this is mandatory for the releaser tool to function correctly)
77+
7778``` bash
7879GOOS=linux GOARCH=amd64 go build -o myapp-linux-amd64-1.0.0 -ldflags=" -X 'main.version=1.0.0'" ./cmd/myapp
7980```
@@ -92,9 +93,10 @@ Release created successfully!
9293```
9394
9495where:
95- - ` name ` is the name of the executable/archive
96- - ` version ` is the version of the release
97- - ` sha256 ` is the sha256 of the executable/archive
96+
97+ - ` name ` is the name of the executable/archive
98+ - ` version ` is the version of the release
99+ - ` sha256 ` is the sha256 of the executable/archive
98100
99101### 4. Server Setup
100102
@@ -120,4 +122,4 @@ For commercial licensing options, please contact
[email protected] .
120122
121123---
122124
123- Made with ❤️ by [ Arduino] ( https://www.arduino.cc/ )
125+ Made with ❤️ by [ Arduino] ( https://www.arduino.cc/ )
You can’t perform that action at this time.
0 commit comments