Skip to content

Commit d7b1e93

Browse files
committed
Simplifies testnet feature flag handling
Refactors the workflow to use a more concise conditional expression for enabling the testnet feature flag during runtime builds. This improves readability and reduces code duplication.
1 parent c3d1744 commit d7b1e93

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.github/workflows/build-runtime.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,8 @@ jobs:
3737

3838
- name: Build runtime
3939
run: |
40-
if [[ "${{ github.ref }}" == refs/tags/runtime/testnet* ]]; then
41-
echo "Building with testnet feature flag"
42-
cargo build --release --timings --package torus-runtime --features testnet
43-
else
44-
echo "Building without testnet feature flag"
45-
cargo build --release --timings --package torus-runtime
46-
fi
40+
echo "Building ${{ startsWith(github.ref, 'refs/tags/runtime/testnet') && 'with testnet feature flag' || 'without testnet feature flag' }}"
41+
cargo build --release --timings --package torus-runtime ${{ startsWith(github.ref, 'refs/tags/runtime/testnet') && '--features testnet' || '' }}
4742
4843
export SHA256SUM=$(sha256sum target/release/wbuild/torus-runtime/torus_runtime.compact.compressed.wasm | cut -d ' ' -f1)
4944
echo Hash of compact and compressed WASM: $SHA256SUM

0 commit comments

Comments
 (0)