Repository navigation
clean site/out and enforce make bin - #2604
Conversation
| rm -rf ./dist/coder-slim_* | ||
| rm -f ./site/out/bin/coder* | ||
| ./scripts/build_go_slim.sh \ | ||
| --compress 6 \ |
There was a problem hiding this comment.
What does this line do/why do we need it?
There was a problem hiding this comment.
From build_go_slim.sh: it compresses the coder-slim binaries.
There was a problem hiding this comment.
I can try to answer this @jsjoeio.
This is the PR that added the feature #2533, the motivation is to significantly reduce the size of "fat" binaries. We use level 6 for dev builds since it's very fast, 22 for prod builds which shaves an additional 20+MB. (You can see the effect on the releases page, comparing v0.7.3 binaries vs v0.7.4 😄)
I guess it's not strictly necessary to compress for make bin, though. Personally I think it's nice if they're prepared in case one does go build -tags embed during development, and it's closer to what we'd do with production builds too.
There was a problem hiding this comment.
Ah! I agree, getting development and production builds to be as similar as possible seems like a good thing to aim for. Thank you both for explaining! Appreciate it 🙌🏼
I got a panic this morning when running v2:
@mafredri and I investigated and it looks like I had a dirty
site/out/binfolder that was missing the shasums.We should probably be clearing this out in between builds.
Also, the warning about
make binseems to be routinely ignored, so enforcing it.I'm also open to just automatically running
make binif folks find the enforcement too aggressive.Future work: serve current binary as agent if running via
develop.sh.