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

[Docs] Automate incrementing of package version for R and non-R version switchers #30850

Closed
Tracked by #28941
asfimport opened this issue Jan 19, 2022 · 3 comments
Closed
Tracked by #28941

Comments

@asfimport
Copy link
Collaborator

asfimport commented Jan 19, 2022

Automate the updating of the version numbers in r/pkgdown/assets/versions.json with dev/release/utils-prepare.sh, and add a test confirming the update at dev/release/01-prepare-test.rb.

Reporter: Nicola Crane / @thisisnic
Assignee: Nicola Crane / @thisisnic

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-15366. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Ian Cook / @ianmcook:
Here are code chunks from those two files that I think could be used as an example:

In utils-prepare.sh you'll need to add lines like this:

sed -i.bak -E -e \
"s/\"version-string\": \".+\"/\"version-string\": \"${version}\"/" \
vcpkg.json
rm -f vcpkg.json.bak
git add vcpkg.json

But that example just replaces a line in a file, whereas this will need to replace lines and add lines to {}versions.json{}.

In 01-prepare-test.rb you'll need to add lines to test_version_pre_tag and test_version_post_tag like this:

{
path: "cpp/vcpkg.json",
hunks: [
["- \"version-string\": \"#{@snapshot_version}\",",
"+ \"version-string\": \"#{@release_version}\","],
],
},

path: "cpp/vcpkg.json",
hunks: [
["- \"version-string\": \"#{@snapshot_version}\",",
"+ \"version-string\": \"#{@next_snapshot_version}\","],
],
},

@asfimport
Copy link
Collaborator Author

Nicola Crane / @thisisnic:
Thanks @ianmcook , that's super helpful!

@asfimport
Copy link
Collaborator Author

Kouhei Sutou / @kou:
Issue resolved by pull request 12212
#12212

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

No branches or pull requests

3 participants