Skip to content

Commit

Permalink
chore: set version before loop
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Jul 27, 2024
1 parent ddd639d commit 1422bd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ jobs:
fi
echo "prefix=$prefix" | tee -a $GITHUB_OUTPUT
git fetch origin "$HEAD_SHA"
version=""
while [[ -z "$version" ]]; do
echo "Checking $root/$source"
if [[ -f "$root/$source" ]]; then
echo "Checking $root/$source"
git checkout "$HEAD_SHA" -- "$root/$source"
version="$(yq -r '.workspace.package.version // .package.version // .version | select(type == "string")' "$root/$source")"
git checkout HEAD -- "$root/$source"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
fi
echo "prefix=$prefix" | tee -a $GITHUB_OUTPUT
git fetch origin "$HEAD_SHA"
version=""
while [[ -z "$version" ]]; do
echo "Checking $root/$source"
if [[ -f "$root/$source" ]]; then
echo "Checking $root/$source"
git checkout "$HEAD_SHA" -- "$root/$source"
version="$(yq -r '.workspace.package.version // .package.version // .version | select(type == "string")' "$root/$source")"
git checkout HEAD -- "$root/$source"
Expand Down

0 comments on commit 1422bd1

Please sign in to comment.