Skip to content

Conversation

ddixit14
Copy link
Contributor

@ddixit14 ddixit14 commented Feb 23, 2023

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
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
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
Contributor Author

Choose a reason for hiding this comment

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

done


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

if [ -e ${module}/README.md ]; then
Copy link
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
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,38 @@
#!/bin/bash

config_line=""
Copy link
Member

Choose a reason for hiding this comment

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

Typo?

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, removed now.


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
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
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.

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} -->"
Copy link
Member

@suztomo suztomo Feb 23, 2023

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
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
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