Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/generate-javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
node-version: '20'
- name: Generate Openapi
run: |
echo "export KUBERNETES_BRANCH=${{ github.event.inputs.kubernetesBranch }} >> ./settings"
echo "export GEN_COMMIT="${{ github.event.inputs.genCommit }}" >> ./settings"
echo "export KUBERNETES_BRANCH="${{ github.event.inputs.kubernetesBranch }}"" >> ./settings
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to mix single and double quotes on these lines? Or, maybe some of the quotes could be escaped? Right now, it's kind of confusing. I think you're intending to add quotes around the value of KUBERNETES_BRANCH, but it seems like the first added quote would match the quote before export and the second set of quotes would be an empty string. Maybe I'm misunderstanding the intention though?

Copy link
Member

Choose a reason for hiding this comment

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

Single quotes for the branch name would be better as this wouldn't result in shell expanding when we would have some fancy branch names.

I'm not 100% sure if GitHub-actions would replace that value in single quotes, but I guess so:

Suggested change
echo "export KUBERNETES_BRANCH="${{ github.event.inputs.kubernetesBranch }}"" >> ./settings
echo "export KUBERNETES_BRANCH='${{ github.event.inputs.kubernetesBranch }}'" >> ./settings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually the real thing I'm trying to do is get rid of the end quote at settings" which was actually what was causing the issue. I think I could eliminate the interior quotes all together unless version is going to have spaces in it, which seems unlikely.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems fine to me.

Copy link
Member

Choose a reason for hiding this comment

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

Go ahead, sounds fine to me as well.

echo "export GEN_COMMIT="${{ github.event.inputs.genCommit }}"" >> ./settings
./generate-client.sh
- name: Generate Branch Name
run: |
Expand Down