Skip to content

feat(builtin): accept any stamp vars in pkg_npm - #2157

Merged
alexeagle merged 2 commits into
bazel-contrib:stablefrom
alexeagle:issue1694
Aug 31, 2020
Merged

alexeagle merged 2 commits into
bazel-contrib:stablefrom
alexeagle:issue1694

Conversation

@alexeagle

Copy link
Copy Markdown
Collaborator

See #1694

@alexeagle
alexeagle force-pushed the issue1694 branch 2 times, most recently from c6ec8b0 to cd0763d Compare August 30, 2020 18:11
@alexeagle
alexeagle marked this pull request as ready for review August 30, 2020 18:51
@alexeagle
alexeagle force-pushed the issue1694 branch 2 times, most recently from 75278e6 to 4c7b4e7 Compare August 30, 2020 19:35
@alexeagle
alexeagle requested a review from jbedard as a code owner August 30, 2020 19:35
Comment thread docs/stamping.md
```python
pkg_npm(
name = "npm_package",
substitutions = {"0.0.0-PLACEHOLDER": "{STABLE_GIT_COMMIT}"},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to make it clearer that if --stamp isn't set, the placeholder will be left alone, rather than set to empty string? Or what happens if the variable isn't defined?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's a subtle behavior change in this PR actually, we used to replace it with 0.0.0 if there was no stamp info. I'll update the doc and the commit description

Alex Eagle added 2 commits August 31, 2020 08:17
NOTE: instead of replacing the replace_with_version with 0.0.0 in unstamped builds,
we now omit the replacement.

See bazel-contrib#1694
Also move most of the content above the list of rules. It shows up better in the TOC since rollup_bundle
can be its own entry later in the page, and avoids the API doc table of attributes just appearing with no header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants