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

Update synth.py to add AUTHENTICATION.md to file lists in *.gemspec and .yardopts #3202

Merged
merged 3 commits into from
Apr 25, 2019

Conversation

quartzmo
Copy link
Member

@quartzmo quartzmo commented Apr 24, 2019

Add AUTHENTICATION.md to file lists in *.gemspec and .yardopts

For background, see: googleapis/synthtool#225

[refs #2933]

Example result:

Chriss-iMac:google-cloud-asset quartzmo$ git diff
diff --git a/google-cloud-asset/.yardopts b/google-cloud-asset/.yardopts
index a221a1518..06724a8d2 100644
--- a/google-cloud-asset/.yardopts
+++ b/google-cloud-asset/.yardopts
@@ -7,3 +7,4 @@
 ./lib/**/*.rb
 -
 README.md
+AUTHENTICATION.md
diff --git a/google-cloud-asset/google-cloud-asset.gemspec b/google-cloud-asset/google-cloud-asset.gemspec
index 679d9ef0e..db09ab793 100644
--- a/google-cloud-asset/google-cloud-asset.gemspec
+++ b/google-cloud-asset/google-cloud-asset.gemspec
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
   gem.platform      = Gem::Platform::RUBY
 
   gem.files         = `git ls-files -- lib/*`.split("\n") +
-                      ["README.md", "LICENSE", ".yardopts"]
+                      ["README.md", "AUTHENTICATION.md", "LICENSE", ".yardopts"]
   gem.require_paths = ["lib"]
 
   gem.required_ruby_version = ">= 2.0.0"

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 24, 2019
@quartzmo quartzmo self-assigned this Apr 24, 2019
@quartzmo quartzmo added the needs work This is a pull request that needs a little love. label Apr 24, 2019
@quartzmo
Copy link
Member Author

If this looks good for google-cloud-asset, I will copy the change to the other generated packages. This change will not be copied to the manual/veneer packages.

@blowmage
Copy link
Contributor

Should this change be made to #3171 instead?

@quartzmo
Copy link
Member Author

I was thinking it will be easier to understand and track our changes to synth.py if we keep them separate from generated PRs.

Add AUTHENTICATION.md to file lists in *.gemspec and .yardopts

[refs googleapis#2933]
@quartzmo quartzmo added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed needs work This is a pull request that needs a little love. labels Apr 24, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 24, 2019
@@ -133,5 +133,16 @@ def escape_braces(match):
])
)

s.replace(
'google-cloud-asset.gemspec',
'"README.md"',
Copy link
Member

Choose a reason for hiding this comment

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

Generally, these synth hacks are to be present until we fix it upstream, so I've generally been writing them so that when it does get fixed upstream, it doesn't break. For example, instead of replacing "README.md" with "README.md", "AUTHENTICATION.md", I'd replace "README.md", "LICENSE" with "README.md", "AUTHENTICATION.md", "LICENSE"

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

s.replace(
'.yardopts',
'README.md',
'README.md\nAUTHENTICATION.md'
Copy link
Member

Choose a reason for hiding this comment

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

Similarly here, I'd suggest replacing README.md\n with README.md\nAUTHENTICATION.md\n

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. I also found 2 gems in which LICENSE was being added to .yardopts, and in these files I merged the older operation with this one.

@quartzmo
Copy link
Member Author

@dazuma Look OK to merge now?

@quartzmo quartzmo added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 24, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 24, 2019
@quartzmo quartzmo merged commit 907cb9e into googleapis:master Apr 25, 2019
@quartzmo quartzmo deleted the synth-gemspec branch April 25, 2019 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants