这是indexloc提供的服务,不要输入任何密码
Skip to content

refactor: improve copy.sh #92

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

Merged

Conversation

jjmaestro
Copy link
Contributor

Note

Stacked on top of #91

refactor: improve the lock copy.sh script

  • separate the script into a template file so it's easier to shellcheck and syntax highlight in editors.

  • shellcheck the script and remove all SC2086 warnings ("Double quote to prevent globbing and word splitting")

  • improve the buildozer help messages in the copy.sh script:

    • reduce duplication of buildozer command
    • add a more clear autofix bazel run command that can be easily copy-pasted
  • change some of the variable names in the copy.sh template for longer, easier to understand names (repo_name >> name, lock_label >> label)

  • move repo_name and workspace_relative_path into variables to reduce line length and improve readability

@jjmaestro jjmaestro changed the title refactor: improve copy sh refactor: improve copy.sh Sep 19, 2024
@jjmaestro jjmaestro mentioned this pull request Sep 19, 2024
@jjmaestro jjmaestro force-pushed the refactor-improve-copy-sh branch from 17862ed to 0afb5dc Compare September 22, 2024 18:43
@jjmaestro
Copy link
Contributor Author

@thesayyn could you continue reviewing the stack of PRs? 😅 🙏 this one and the previous 3 PRs in the stack (87, 88, and 91) should be very easy to review, they add a few things before the larger refactors.

Thanks!!

@jjmaestro jjmaestro force-pushed the refactor-improve-copy-sh branch 4 times, most recently from 97c2331 to 05914ac Compare October 29, 2024 08:23
* separate the script into a template file so it's easier to shellcheck
  and syntax highlight in editors.

* shellcheck the script and remove all SC2086 warnings
  ("Double quote to prevent globbing and word splitting")

* improve the buildozer help messages in the copy.sh script:
  * reduce duplication of buildozer command
  * add a more clear autofix bazel run command that can be easily
    copy-pasted

* change some of the variable names in the copy.sh template for longer,
  easier to understand names (repo_name >> name, lock_label >> label)

* move repo_name and workspace_relative_path into variables to reduce
  line length and improve readability
@jjmaestro jjmaestro force-pushed the refactor-improve-copy-sh branch from 05914ac to 95ad300 Compare November 14, 2024 01:07
@jjmaestro
Copy link
Contributor Author

jjmaestro commented Nov 14, 2024

@thesayyn I think I've addressed the issue in your review re. the Label as a private attribute, please have a look and let me know if this is better! And approve the workflow checks please! 🙏 😅

P.S. I've also rebased all of the other branches so they should be ready for review too :)

@jjmaestro jjmaestro requested a review from thesayyn November 14, 2024 01:09
@thesayyn thesayyn merged commit e43119e into GoogleContainerTools:main Nov 14, 2024
10 checks passed
@jjmaestro jjmaestro deleted the refactor-improve-copy-sh branch November 14, 2024 23:11
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