Skip to content

Commit

Permalink
This is Manh Cuong's commit 🌻.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed May 17, 2024
1 parent d797aec commit 843fa46
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ jobs:
*Repository*: `${{ github.repository }}`
*Author*: `${{ github.actor }}`
*Action*: Building `vngcloud-go-sdk:${{ github.ref_name }}` package
*Commit message*:
```
${{ github.event.commits[0].message }}
```
*See changes*: https://github.com/${{ github.repository }}/commit/${{github.sha}}
*See workflow*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Check out code into the Go module directory
Expand Down Expand Up @@ -61,10 +57,6 @@ jobs:
*Repository*: `${{ github.repository }}`
*Author*: `${{ github.actor }}`
*Action*: Failed to build `vngcloud-go-sdk:${{ github.ref_name }}` package
*Commit message*:
```
${{ github.event.commits[0].message }}
```
*See changes*: https://github.com/${{ github.repository }}/commit/${{github.sha}}
*See workflow*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Send alert that the image has been built success
Expand All @@ -79,9 +71,5 @@ jobs:
*Repository*: `${{ github.repository }}`
*Author*: `${{ github.actor }}`
*Action*: The `vngcloud-go-sdk:${{ github.ref_name }}` package is built successfully
*Commit message*:
```
${{ github.event.commits[0].message }}
```
*See changes*: https://github.com/${{ github.repository }}/commit/${{github.sha}}
*See workflow*: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
7 changes: 6 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# .goreleaser.yaml
builds:
- skip: true
- skip: true

ldflags:
- -s
- -w
- -X 'github.com/vngcloud/vngcloud-go-sdk/vngcloud/version.Version={{.Tag}}'
14 changes: 14 additions & 0 deletions vngcloud/version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package version

import (
"fmt"
"os"
)

// Version is set by the linker flags in the Makefile.
var Version string

func PrintVersionAndExit() {
fmt.Printf("%s\n", Version)
os.Exit(0)
}

0 comments on commit 843fa46

Please sign in to comment.