mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(data): lint json changes before migrating
This commit is contained in:
parent
90e2b71457
commit
2a2c0b7e03
1 changed files with 30 additions and 9 deletions
|
|
@ -41,17 +41,11 @@ steps:
|
|||
echo "##vso[task.setvariable variable=aborted;isOutput=true]false"
|
||||
fi
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: use latest dotnet sdk
|
||||
- task: ShellScript@2
|
||||
displayName: lint json
|
||||
condition: and(eq(variables['abortJustMigrated.aborted'], 'false'), succeeded())
|
||||
inputs:
|
||||
version: 3.x
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: install ef dotnet tool
|
||||
condition: and(eq(variables['abortJustMigrated.aborted'], 'false'), succeeded())
|
||||
inputs:
|
||||
script: dotnet tool install -g dotnet-ef
|
||||
scriptPath: data/lint.sh
|
||||
|
||||
- task: Bash@3
|
||||
displayName: git config
|
||||
|
|
@ -65,6 +59,33 @@ steps:
|
|||
git config --global user.name "$GITHUBNAME"
|
||||
git config --global user.email "$GITHUBEMAIL"
|
||||
|
||||
- task: Bash@3
|
||||
displayName: commit lint results
|
||||
name: commitLint
|
||||
condition: and(eq(variables['abortJustMigrated.aborted'], 'false'), succeeded())
|
||||
inputs:
|
||||
targetType: inline
|
||||
workingDirectory: data
|
||||
script: |
|
||||
DIFF=$(git status -s -- . | wc -l)
|
||||
echo "$DIFF file(s) required linting"
|
||||
if (( $DIFF > 0 )) ; then
|
||||
git add .
|
||||
git commit -m "refactor(data): lint PR #$SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"
|
||||
fi
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: use latest dotnet sdk
|
||||
condition: and(eq(variables['abortJustMigrated.aborted'], 'false'), succeeded())
|
||||
inputs:
|
||||
version: 3.x
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: install ef dotnet tool
|
||||
condition: and(eq(variables['abortJustMigrated.aborted'], 'false'), succeeded())
|
||||
inputs:
|
||||
script: dotnet tool install -g dotnet-ef
|
||||
|
||||
- task: Bash@3
|
||||
displayName: revert existing PR migration
|
||||
condition: and(eq(variables['abortJustMigrated.aborted'], 'false'), succeeded())
|
||||
|
|
|
|||
Loading…
Reference in a new issue