diff --git a/scripts/bump/README.md b/scripts/bump/README.md index 2a97c1dfe..7f01e6f41 100644 --- a/scripts/bump/README.md +++ b/scripts/bump/README.md @@ -54,3 +54,43 @@ can be quite effective in reducing it: build: split-objs: true ``` + +## Updating the binaries + +The platform-specific binaries in the parent directory (`bump.lnx64` and `bump.mac`) +need to be manually updated after every change to the source here. + +To do this, first build the binary for Mac: + +``` +stack build +cp .stack-work/install/x86_64-osx//8.6.5/bin/bump ../bump.mac +``` + +(The build ID is printed as part of the stack build run.) + +Then, add this to the options from above to produce static binaries on Linux +(otherwise, there's a good chance Sandcastle won't run it). The binary section +should then look like this: + +*package.yaml* +```diff +diff --git a/xplat/sonar/scripts/bump/package.yaml b/xplat/sonar/scripts/bump/package.yaml +--- a/xplat/sonar/scripts/bump/package.yaml ++++ b/xplat/sonar/scripts/bump/package.yaml +@@ -12,3 +12,4 @@ + bump: + source-dirs: . + main: bump.hs ++ ghc-options: -optl-static -optl-pthread -fPIC + +``` + +With the docker daemon running, execute: + +``` +stack build --docker +cp .stack-work/install/x86_64-linux-//8.6.5/bin/bump ../bump.lnx64 +``` + +Commit the changes, done.