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

tools, docs: Parse version.txt using shlex and bash #279

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

krnowak
Copy link
Member

@krnowak krnowak commented Oct 12, 2023

This is to guard against quoted values.

@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://lemon-wave-085522403-279.westeurope.1.azurestaticapps.net

This is to guard against quoted values.
This guards against possible quotes.
@github-actions
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://lemon-wave-085522403-279.westeurope.1.azurestaticapps.net

@krnowak krnowak changed the title tools: Use shlex for parsing version.txt tools, docs: Parse version.txt using shlex and bash Oct 26, 2023
@@ -127,7 +127,7 @@ read SSH_KEY_ID
If not done yet, [create a custom image](https://developers.digitalocean.com/documentation/v2/#create-a-custom-image) from the current Flatcar Container Linux Stable version:

```shell
VER=$(curl https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt | grep -m 1 FLATCAR_VERSION_ID= | cut -d = -f 2)
VER=$(source <(curl https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt); echo "${FLATCAR_VERSION_ID}")
Copy link
Member

Choose a reason for hiding this comment

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

If this should serve as reference for copy paste it would be good to have error reporting with set -euo pipefail still work. The <(CMD) usage swallows the error - maybe an explicit check for a non-empty string could be added before the echo.

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.

None yet

2 participants