Skip to content

Commit

Permalink
Merge pull request #10 from maximumadmin/bugfix/fix-os-detection-and-…
Browse files Browse the repository at this point in the history
…module-permissions

Better OS detection and fix Go module permissions
  • Loading branch information
maximumadmin authored May 17, 2021
2 parents b7c2f2b + 8f27d7b commit c33ea7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif
default:
@{\
set -e ;\
os_release_id=$$(grep -E '^ID=' /etc/os-release | sed 's/ID=//' || true) ;\
os_release_id=$$(grep -E '^ID(_LIKE)?=' /etc/os-release | sort | head -n 1 | sed -r 's/ID(_LIKE)?=//' || true) ;\
if [ "$$os_release_id" = "arch" ]; then \
make --no-print-directory release type=dynamic ;\
else \
Expand Down Expand Up @@ -56,7 +56,7 @@ release:
release-static:
@{\
set -e ;\
args=(-a -trimpath -ldflags "-w -s $${VERSION_FLAGS}") ;\
args=(-a -trimpath -mod=readonly -modcacherw -ldflags "-w -s $${VERSION_FLAGS}") ;\
if [ "$${GOARCH}" != "arm" ]; then \
args+=("-buildmode=pie") ;\
fi ;\
Expand All @@ -71,7 +71,7 @@ release-dynamic:
export CGO_CFLAGS="$${CFLAGS}" ;\
export CGO_CXXFLAGS="$${CXXFLAGS}" ;\
export CGO_LDFLAGS="$${LDFLAGS}" ;\
args=(-a -trimpath -ldflags "-linkmode external -w -s $${VERSION_FLAGS}") ;\
args=(-a -trimpath -mod=readonly -modcacherw -ldflags "-linkmode external -w -s $${VERSION_FLAGS}") ;\
if [ "$${GOARCH}" != "arm" ]; then \
args+=("-buildmode=pie") ;\
fi ;\
Expand Down

0 comments on commit c33ea7f

Please sign in to comment.