Skip to content

Commit eb60679

Browse files
committed
add ignore keys for anchor > 1.0
1 parent 1a15ae2 commit eb60679

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

build-anchor/action.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ runs:
1919
FEATURES="--features $FEATURES"
2020
fi
2121
22-
anchor build -p ${{ inputs.program }} -- $FEATURES
22+
IGNORE_KEYS=""
23+
ANCHOR_MAJOR=$(anchor --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | cut -d. -f1)
24+
if [ "$ANCHOR_MAJOR" -ge 1 ] 2>/dev/null; then
25+
IGNORE_KEYS="--ignore-keys"
26+
fi
27+
28+
anchor build -p ${{ inputs.program }} $IGNORE_KEYS -- $FEATURES
2329
- name: Copy artifacts from container
2430
shell: bash
2531
run: |

0 commit comments

Comments
 (0)