Skip to content

Adjust "bin" section of package.json#316

Merged
philrz merged 1 commit intomainfrom
package-json-bin
Aug 19, 2023
Merged

Adjust "bin" section of package.json#316
philrz merged 1 commit intomainfrom
package-json-bin

Conversation

@philrz
Copy link
Contributor

@philrz philrz commented Aug 18, 2023

I figured this one out by running yarn install --inline-builds on Zui commit cb746af and cd'ing to the tmp directory it showed for where it cloned the Brimcap repo. By doing git diff while it was building I could see the following output:

$ git diff
diff --git a/package.json b/package.json
index ae2941c..aabe748 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,7 @@
 {
   "name": "brimcap",
   "version": "1.1.2",
-  "bin": {
-    "brimcap": "build/dist/brimcap"
-  },
+  "bin": "build/dist/brimcap",
   "files": [
     "build/dist/**"
   ],

So it looks like the changes from #306 to package.json are simplified during the build process and that's enough to render the build artifacts as "dirty".

Here's verification that the -dirty goes away when using the Brimcap based on this fix branch.

$ for COMMIT in 76707da; do   rm -rf ~/.yarn/berry/cache/brimcap* && git clone https://github.com/brimdata/zui.git zui-${COMMIT} && pushd zui-${COMMIT} && git checkout ${COMMIT} && gsed -i 's/brimcap#.*/brimcap#d6a430d85f426a826276b61f56be1ac8c0259666",/' package.json && yarn && node_modules/brimcap/build/dist/brimcap -version; popd; done
...
Version: v1.4.0-26-gd6a430d

Sadly, even with this change in place, it looks like brimcap -version broke in some other way again with the Monorepo changes in brimdata/zui#2818, but I'm game to fix these problems one layer at a time.

Fixes brimdata/zui#2840

@philrz philrz requested review from jameskerr and nwt August 18, 2023 20:35
@philrz philrz self-assigned this Aug 18, 2023
@philrz philrz requested a review from mattnibs August 18, 2023 20:36
@philrz philrz merged commit 66ed566 into main Aug 19, 2023
@philrz philrz deleted the package-json-bin branch August 19, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"brimcap -version" on bundled binary shows "-dirty"

2 participants