Repository navigation
refactor(packaging): move the copied build logic into lib.sh (untested on build machine) - #29761
Merged
chrisnojima merged 4 commits intoOct 15, 2026
Conversation
chrisnojima
added this pull request to stack #29759
October 12, 2026 18:08
zoom-ua
approved these changes
Oct 13, 2026
chrisnojima
marked this pull request as ready for review
October 14, 2026 13:51
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-lib
branch
from
October 14, 2026 14:01
260be77 to
7d766fd
Compare
- lib.sh gains KB_CODESIGN_IDENTITY, kb_sign_binary, kb_release_bin (builds the release tool once per build and exports KB_RELEASE_BIN for child scripts), kb_build_id and kb_lib_version; the prerelease, desktop, linux and gobuild scripts use them instead of their own copies. - ios/build_and_publish.sh finds the checkout from its own location. - packaging/slack/ is now packaging/notify/ (it posts to Keybase chat). - build_app.sh uses one platform variable; PlistBuddy is spelled correctly.
…IENT_DIR - kb_release_bin reuses an exported binary only when GOPATH and the checkout's commit match, and installs with GOBIN pinned to $GOPATH/bin. - kb_build_id surfaces git errors in a checkout; SOURCE_COMMIT is only the fallback outside one. - KB_CLIENT_DIR ignores CDPATH; build_app.sh points it at its CLIENT_DIR. - osx/Scripts/build.sh and go/updater/osx/build.sh read the signing identity from lib.sh.
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-lib
branch
from
October 14, 2026 17:42
7d766fd to
4efabd1
Compare
build_app.sh checks out the commit it builds while bash is still running the copy it opened, so the build machine's master script called packaging/slack/send.sh in a tree where it had moved to notify/ and the build exited non-zero after uploading. Keep the old path and note the constraint.
donttreadonme1809-alt
approved these changes
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves the logic the packaging scripts copy between each other into
packaging/lib.sh. Stacked on #29760.lib.shKB_CODESIGN_IDENTITYbuild_keybase.sh,build_kbfs.sh,build_updater.sh,package_darwin.sh,osx/Scripts/build.shandgo/updater/osx/build.shkb_sign_binary <path>...prerelease/build_*.shscripts. It runs the samecodesignflags for each path.kb_release_bingo install …/go/releasecalls inbuild_app.sh,package_darwin.sh,s3_index.sh,report.sh,linux/build_and_push_packages.shandgobuild.sh. It builds the tool once and exportsKB_RELEASE_BIN, so the scripts it launches reuse it.kb_build_iddate -u +%Y%m%d%H%M%Splus short commit hash computed inversion.sh,build_app.sh,build_keybase.sh,build_kbfs.shandgobuild.shkb_lib_versiongo/libkb/version.go.windows/dorelease.cmdkeeps its own and points here.More on
kb_release_bin:go/;go/buildtoolsis the same module.GOPATHand the checkout's commit, so a value inherited from another build is rebuilt.GOBINpinned to$GOPATH/bin.Other changes:
build_app.shbuilds the release tool after theCLIENT_COMMITcheckout.package_darwin.sh,s3_index.shandreport.shalready rebuilt it at that commit, so they now just reuse it.build_app.shpoints the helpers at itsCLIENT_DIRcheckout, and uses one platform variable instead of mixing$PLATFORMand$platform.ios/build_and_publish.shfinds the checkout from its own location, the way the Android script does.packaging/slack/send.shkeeps its name.build_app.shkeeps running the build machine's master copy after it checks outCLIENT_COMMIT, so every path it calls must exist in both trees. A comment at the checkout andpackaging/README.mdsay so./usr/libexec/plistBuddyis now/usr/libexec/PlistBuddyeverywhere.packaging/README.mdlists the helpers.Tested locally
kb_lib_versionmatchesversion.go, andkb_build_idmatches the old formula. It falls back toSOURCE_COMMIToutside git and works in a git worktree.version.sh productionandversion.sh prereleaseprint the same values as before.codesign,kb_sign_binaryruns exactly the old command line for each binary.kb_release_bin:GOBINset elsewhere still installs into$GOPATH/bin.bash -npasses on every touched script, and the shellcheck job checks the rest.The test build must confirm
NOWAIT=1 NOS3=1 TEST=1 PLATFORM=darwin ./build_app.shcompletes for amd64 and arm64.build_app.shrun.keybase version -S,kbfs -version,KEYBASE_VERSIONand the dmg/zip names all carry the same build id.codesignverify andspctl --assesschecks inpackage_darwin.shpass, and so does notarization when it isn't skipped.slack/send.sh.s3_index.shandreport.shdon't rebuild the release tool.$GOPATH/src, andgobuild.shworks withCHECK_CIboth on and off.