diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bafbb3..9cd7746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,24 +45,27 @@ jobs: - name: Test outputs shell: bash run: | - if [[ -z ${{ matrix.version }} ]]; then + if [[ -z "${{ matrix.version }}" ]]; then echo "No version argument" TOIT_URL="${{ steps.setup2.outputs.toit-url }}" TOIT_DIR="${{ steps.setup2.outputs.toit-install-dir }}" TOIT_SDK="${{ steps.setup2.outputs.toit-sdk-path }}" TOIT_VERSION="${{ steps.setup2.outputs.toit-version }}" - if [[ ${{ steps.setup2.outputs.toit-version }} == "" ]]; then - echo "No version" - exit 1 - fi else echo "With version argument" TOIT_URL="${{ steps.setup1.outputs.toit-url }}" TOIT_DIR="${{ steps.setup1.outputs.toit-install-dir }}" TOIT_SDK="${{ steps.setup1.outputs.toit-sdk-path }}" TOIT_VERSION="${{ steps.setup1.outputs.toit-version }}" - if [[ ${{ matrix.version }} != ${{ steps.setup1.outputs.toit-version }} ]]; then - echo "Version argument does not match output" + fi + if [[ "$TOIT_VERSION" == "" ]]; then + echo "No version" + exit 1 + fi + + if [[ "${{ matrix.version }}" != "latest" -a "${{ matrix.version }}" != "" ]]; then + if [[ "$TOIT_VERSION" != "${{ matrix.version }}" ]]; then + echo "Version does not match" exit 1 fi fi