Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add extra-files input #410

Merged
merged 4 commits into from Jan 17, 2022
Merged

feat: add extra-files input #410

merged 4 commits into from Jan 17, 2022

Conversation

jcornaz
Copy link
Contributor

@jcornaz jcornaz commented Jan 3, 2022

@bcoe
Copy link
Contributor

bcoe commented Jan 3, 2022

@jcornaz try installing the latest version of release-please and running npm run build.

@jcornaz
Copy link
Contributor Author

jcornaz commented Jan 3, 2022

Thanks @bcoe. It does work now :-)

@jcornaz jcornaz marked this pull request as ready for review January 3, 2022 17:06
@jcornaz jcornaz mentioned this pull request Jan 4, 2022
@bcoe
Copy link
Contributor

bcoe commented Jan 12, 2022

@jcornaz mind rebasing?

@jcornaz
Copy link
Contributor Author

jcornaz commented Jan 13, 2022

@bcoe I rebased 👍

@@ -55,6 +55,7 @@ Automate releases with Conventional Commit Messages.
| `monorepo-tags` | add prefix to tags and branches, allowing multiple libraries to be released from the same repository. |
| `changelog-types` | A JSON formatted String containing to override the outputted changelog sections |
| `version-file` | provide a path to a version file to increment (used by ruby releaser) |
| `extra-files` | add extra-files to bump using the [generic updater](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files) |
Copy link
Contributor

Choose a reason for hiding this comment

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

A small additional example in README.md, that demonstrates how to provide multiline input I think would be valuable, I assume it's:

extra-files:
  - file a
  - file b
```?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll add an example.

Here is how to provide multiline inputs:

extra-files: |
  file1
  file2

IMO the syntax you mentioned would have bean nicer, because that's how we are used to define lists in yaml, but github actions uses multi-line input instead: actions/toolkit#829

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bcoe I am not sure where I should add the example in the readme. Should it be directly in the table of inputs? Or should I add a dedicated section later in the readme?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jcornaz I'd just add an extra section after:

Creating major/minor tags

Along the lines of Adding additional files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the readme

@jcornaz jcornaz requested a review from bcoe January 14, 2022 08:18
@bcoe bcoe merged commit a487a5b into google-github-actions:main Jan 17, 2022
@bcoe
Copy link
Contributor

bcoe commented Jan 17, 2022

@jcornaz thank you 🥳

@patoncrispy
Copy link

How does this work with updating xml or json files? How can I set the xpath?

@jcornaz
Copy link
Contributor Author

jcornaz commented Jul 12, 2022

How does this work with updating xml or json files? How can I set the xpath?

You cannot set a XPath. In the file you want to update, you have to comment in the file where are the part want to update. See: https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files for more details

Example:

<myxml>
  <version>1.0.0</version> <!-- x-release-please-version -->
</myxml>

@patoncrispy
Copy link

Thanks @jcornaz . I've tried that with the simple strategy but it's ignoring the extra-files option. At least, I cannot see anything in the output and there's no change in the PR it creates. Are there any examples of how to use this? The docs are pretty light.
image

@jcornaz
Copy link
Contributor Author

jcornaz commented Jul 13, 2022

Mmh strange, it should work. I suggest you open an issue and share an example of how to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

append extra file changes in pull request
3 participants