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

Resolve unquoted variable usage in workflow shell scripts. #172

Merged
merged 4 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ set -eo pipefail
tag="${GITHUB_REF#refs/*/}"

# This is the package name minus `Ligare.`.
package_name=$(gawk 'match($0, /Ligare\.?([^-]+)?/, m) { print s m[1]}' <<<$tag)
package_name="$(gawk 'match($0, /Ligare\.?([^-]+)?/, m) { print s m[1]}' <<<"$tag")"
# `all` is the root of the repository and includes all other packages
if [ "$package_name" == "all" ]; then
package_directory=.
else
package_directory="src/$package_name/"
fi
echo "package_name=$package_name" >> "$GITHUB_OUTPUT"
echo "package_directory=$package_directory" >> "$GITHUB_OUTPUT"
echo "package_directory=$package_directory" >> "$GITHUB_OUTPUT"
8 changes: 4 additions & 4 deletions publish_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ declare -a packages=( \

initialize

for package in ${packages[@]}; do
build $package
for package in "${packages[@]}"; do
build "$package"
done

# default to testpypi
[ -n "$1" ] && repository="$1" || repository="testpypi"

tput init 2> /dev/null
for package in ${packages[@]}; do
publish $package $repository
for package in "${packages[@]}"; do
publish "$package" "$repository"
done

Loading