Skip to content

Commit

Permalink
trying again to correctly skip root packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Dec 13, 2024
1 parent 1e2c4cf commit 1115a11
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ runs:
if: ${{ (inputs.build-cache-token != 'unspecified') && (inputs.push-only-dependencies == 'true')}}
shell: bash
run: |
spack -e myenv find --no-groups -X > specs.txt
awk 'NR > 1 && NF {found=1} found' specs.txt | grep -qE "@develop|@master|@main"
if [ $? -eq 0 ]; then
spack -e myenv find --no-groups -X \
| awk 'BEGIN { skip=1 } /^$/ { skip=0; next } skip==0 { print }' > specs.txt
if grep -qE "@develop|@master|@main" specs.txt; then
echo "Error: Found develop dependencies (@develop, @master, or @main) in specs.txt." >&2
echo "------ specs are the following:" >&2
echo "------ Specs are the following:" >&2
cat specs.txt >&2
exit 1
else
Expand All @@ -98,11 +98,11 @@ runs:
if: ${{ (inputs.build-cache-token != 'unspecified') && (inputs.push-only-dependencies == 'false')}}
shell: bash
run: |
spack -e myenv find --no-groups > specs.txt
awk 'NR > 1 && NF {found=1} found' specs.txt | grep -qE "@develop|@master|@main"
if [ $? -eq 0 ]; then
spack -e myenv find --no-groups \
| awk 'BEGIN { skip=1 } /^$/ { skip=0; next } skip==0 { print }' > specs.txt
if grep -qE "@develop|@master|@main" specs.txt; then
echo "Error: Found develop dependencies (@develop, @master, or @main) in specs.txt." >&2
echo "------ specs are the following:" >&2
echo "------ Specs are the following:" >&2
cat specs.txt >&2
exit 1
else
Expand Down

0 comments on commit 1115a11

Please sign in to comment.