ui5-migration icon indicating copy to clipboard operation
ui5-migration copied to clipboard

UI5 Migrate should return != 0, if files have been modified

Open bkrrrr opened this issue 3 years ago • 0 comments

This tool would be great to check UI5 apps in Github actions for none recommended code pattern. The only thing missing, is a return code that lets a ci fail e.g. -1.

image

Workaround:

name: 'migration'
description: 'see https://www.npmjs.com/package/@ui5/migration'
runs:
  using: "composite"
  steps:
      - name: Install
        run: npm install --global @ui5/migration
        shell: bash
      # see https://github.com/SAP/ui5-migration/issues/209
      - name: run-migration 
        run: | 
          ui5-migration migrate
          echo 'delta<<EOF' >> $GITHUB_ENV
          git diff --color webapp/  >> $GITHUB_ENV
          echo 'EOF' >> $GITHUB_ENV
        shell: bash
      - name: check
        run: echo "${{ env.delta }}"  && exit ${{ env.delta && 1 || 0 }}
        shell: bash

bkrrrr avatar Oct 22 '21 06:10 bkrrrr