Comments (4)
@phanirithvij
Thank you for your comment.
gup does not support ldflags; an implementation is needed to support ldflags.
from gup.
NOTE: need to change this code.
Lines 189 to 204 in ce661c5
from gup.
Found a way to do it with environment vars
# for a reproducible build
GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-s" gup update
# or just
GOFLAGS="-ldflags=-s" gup update
-w
doesn't seem to be doing anything when -s is used. (tried it and Go BuildID obtained from file command is same with or without -w when using along with -s) as GOFLAGS="-ldflags='-w -s'" is illegal, ignoring -w (thank god)- Another alternate is to just use the linux
strip
command.strip $GOBIN/*
- refer:
- So aliasing gup to include goflags should be enough
from gup.
- As for whether or not gup should have ldflags, I think it would be helpful, when complex ldflags like for e.g.
-X pkg/path.VersionX ... -X ...
are needed. But for simple things like above GOFLAGS should suffice. - and I don't think people using
gup update
are expecting any such wild behavior other than just cli binaries getting updated.
from gup.
Related Issues (20)
- Contributors HOT 2
- [BUG Report] Confirmation with [Y/n] should default to "yes" HOT 1
- Feature: Automatically adapt to module path changes.
- Feature: rebuild with newer toolchain if available, even if version same HOT 3
- Update the outdated README
- Version comparison is naive HOT 2
- -m support for check HOT 1
- Auto-generate PowerShell completion file
- Falls back if the current version is newer than the latest HOT 7
- [Proposal] Add platform testing in the CI (GitHub Actions) HOT 3
- Add option to disable notification HOT 5
- Pass unit tests with GitHub Actions for *BSD HOT 3
- [BUG] "@latest" vs "@master", the "latest" wins HOT 10
- Support XDG_CONFIG_HOME for configuration files path HOT 2
- make generation of completion configurable HOT 2
- Extreme cpu and memory usage HOT 3
- [BUG Report] Ignore .DS_Store files on macOS HOT 2
- Feature Request option to ignore a binary update HOT 4
- Refactoring for upgrading to gup version 1.0.0. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gup.