Skip to content

chore: Making automated version updates in readme.md#9150

Merged
ddixit14 merged 6 commits into
mainfrom
readme-update
Feb 28, 2023
Merged

chore: Making automated version updates in readme.md#9150
ddixit14 merged 6 commits into
mainfrom
readme-update

Conversation

@ddixit14

@ddixit14 ddixit14 commented Feb 23, 2023

Copy link
Copy Markdown
Contributor

This PR does 2 things:

  1. Adding readme_update.sh script which is responsible for adding annotations in all the valid readme.md files.
  2. After running the script, all the readme.md's have annotations in them, except a few modules.

Later on I will introduce how to use libraries-bom in all the readme's, along with automated version updates for it.

@ddixit14 ddixit14 requested a review from suztomo February 23, 2023 15:56
Comment thread generation/readme_update.sh
Comment thread generation/readme_update.sh Outdated
for module in $(find . -mindepth 2 -maxdepth 2 -name pom.xml | sort | xargs dirname); do

if [[ "${module}" = *java-core ]] || [[ "${module}" = *java-shared-dependencies ]] || [[ "${module}" = *java-iam ]]; then
continue

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indent file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread generation/readme_update.sh Outdated

readme_file="${module}/README.md"

if [ -e ${module}/README.md ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indent file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread generation/readme_update.sh Outdated
@@ -0,0 +1,38 @@
#!/bin/bash

config_line=""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, removed now.

Comment thread generation/readme_update.sh
Comment thread generation/readme_update.sh Outdated

for module in $(find . -mindepth 2 -maxdepth 2 -name pom.xml | sort | xargs dirname); do

if [[ "${module}" = *java-core ]] || [[ "${module}" = *java-shared-dependencies ]] || [[ "${module}" = *java-iam ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should java-iam be excluded? If so, can you add source code comment why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think it should have been excluded. I've added it back again, along with necessary changes in its readme.

Comment thread generation/readme_update.sh Outdated
line_number_end=$(grep -n -m 1 "Scala" ${readme_file} | sed 's/\([0-9]*\).*/\1/')
end_line=${line_number_end}+4

start_line_append="<!--- {x-version-update-start:${artifactId}:released} -->"

@suztomo suztomo Feb 23, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
start_line_append="<!--- {x-version-update-start:${artifactId}:released} -->"
start_line_append="<!-- {x-version-update-start:${artifactId}:released} -->"

I believe it's unnecessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, it works either way.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, it works but unnecessary. Let's not to have unnecessary characters.

@ddixit14 ddixit14 merged commit ef9c246 into main Feb 28, 2023
@ddixit14 ddixit14 deleted the readme-update branch February 28, 2023 14:45
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.

2 participants