Skip to content

Commit

Permalink
fix: fix ld problem
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Oct 30, 2022
1 parent 005af33 commit 7a99afb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Build Backend
run: |
go mod download
go build -ldflags "-s -w -extldflags '-static' -X 'gin-template/common.Version=$(git describe --tags)'" -o gin-template
go build -ldflags "-s -w -X 'gin-template/common.Version=$(git describe --tags)'" -o gin-template
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build Backend
run: |
go mod download
go build -ldflags "-s -w -extldflags '-static' -X 'gin-template/common.Version=$(git describe --tags)'" -o gin-template.exe
go build -ldflags "-s -w -X 'gin-template/common.Version=$(git describe --tags)'" -o gin-template.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /build
COPY . .
COPY --from=builder /build/build ./web/build
RUN go mod download
RUN go build -ldflags "-s -w -extldflags '-static'" -o gin-template
RUN go build -ldflags "-s -w" -o gin-template

FROM scratch

Expand Down
1 change: 0 additions & 1 deletion controller/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ func GitHubOAuth(c *gin.Context) {
user.Username = "github_" + githubUser.Login
if model.IsUsernameAlreadyTaken(user.Username) {
user.FillUserByUsername()
fmt.Println(user)
} else {
user.DisplayName = githubUser.Name
user.Role = common.RoleCommonUser
Expand Down

0 comments on commit 7a99afb

Please sign in to comment.