Skip to content

Commit 04c565b

Browse files
authored
Add linux debug target in release assets, update golangci-lint (#48)
1 parent b9ea846 commit 04c565b

6 files changed

Lines changed: 14 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project.
2626
Add `Makefile` to your module with includes standard targets.
2727

2828
```Makefile
29-
#GOLANGCI_LINT_VERSION := "v1.50.0" # Optional configuration to pinpoint golangci-lint version.
29+
#GOLANGCI_LINT_VERSION := "v1.50.1" # Optional configuration to pinpoint golangci-lint version.
3030

3131
# The head of Makefile determines location of dev-go to include standard targets.
3232
GO ?= go

makefiles/base.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#GOLANGCI_LINT_VERSION := "v1.50.0" # Optional configuration to pinpoint golangci-lint version.
1+
#GOLANGCI_LINT_VERSION := "v1.50.1" # Optional configuration to pinpoint golangci-lint version.
22

33
# The head of Makefile determines location of dev-go to include standard targets.
44
GO ?= go

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
[ -z "$GO" ] && GO=go
4-
[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.50.0"
4+
[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v1.50.1"
55

66
# detecting GOPATH and removing trailing "/" if any
77
GOPATH="$(go env GOPATH)"

scripts/release-assets.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[[ "$RELEASE_TARGETS" == *"darwin/amd64"* ]] && (echo "Building Darwin AMD64 binary" && GOOS=darwin GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_amd64.tar.gz * && rm *) || :
44
[[ "$RELEASE_TARGETS" == *"darwin/arm64"* ]] && (echo "Building Darwin ARM64 binary" && GOOS=darwin GOARCH=arm64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../darwin_arm64.tar.gz * && rm *) || :
55
[[ "$RELEASE_TARGETS" == *"linux/amd64"* ]] && (echo "Building Linux AMD64 binary" && GOOS=linux GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64.tar.gz * && rm *) || :
6+
[[ "$RELEASE_TARGETS" == *"linux/dbg-amd64"* ]] && (echo "Building Debug Linux AMD64 binary" && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 $GO build -race -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_amd64_dbg.tar.gz * && rm *) || :
67
[[ "$RELEASE_TARGETS" == *"linux/arm64"* ]] && (echo "Building Linux ARM64 binary" && GOOS=linux GOARCH=arm64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm64.tar.gz * && rm *) || :
78
[[ "$RELEASE_TARGETS" == *"linux/arm32"* ]] && (echo "Building Linux ARM binary" && GOOS=linux GOARCH=arm $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && tar zcvf ../linux_arm.tar.gz * && rm *) || :
89
[[ "$RELEASE_TARGETS" == *"windows/amd64"* ]] && (echo "Building Windows AMD64 binary" && GOOS=windows GOARCH=amd64 $GO build -ldflags "$(bash $DEVGO_SCRIPTS/version-ldflags.sh && echo $BUILD_LDFLAGS)" -o $BUILD_DIR/ $BUILD_PKG && cd $BUILD_DIR && zip -9 -j ../windows_amd64.zip * && rm *) || :

templates/github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
go-version: 1.19.x
2525
- uses: actions/checkout@v2
2626
- name: golangci-lint
27-
uses: golangci/golangci-lint-action@v3.2.0
27+
uses: golangci/golangci-lint-action@v3.3.1
2828
with:
2929
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
30-
version: v1.50.0
30+
version: v1.50.1
3131

3232
# Optional: working directory, useful for monorepos
3333
# working-directory: somedir

templates/github/workflows/release-assets.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ jobs:
4141
asset_path: ./linux_amd64.tar.gz
4242
asset_name: linux_amd64.tar.gz
4343
asset_content_type: application/tar+gzip
44+
- name: Upload linux_amd64_dbg.tar.gz
45+
if: hashFiles('linux_amd64.tar.gz') != ''
46+
uses: actions/upload-release-asset@v1
47+
with:
48+
upload_url: ${{ github.event.release.upload_url }}
49+
asset_path: ./linux_amd64_dbg.tar.gz
50+
asset_name: linux_amd64_dbg.tar.gz
51+
asset_content_type: application/tar+gzip
4452
- name: Upload linux_arm64.tar.gz
4553
if: hashFiles('linux_arm64.tar.gz') != ''
4654
uses: actions/upload-release-asset@v1

0 commit comments

Comments
 (0)