File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,11 @@ trigger:
6
6
include :
7
7
- ' main'
8
8
- ' release/*'
9
- - ' spec-main'
10
- - ' spec-release/*'
11
9
pr : none
12
10
13
11
steps :
12
+ - checkout : self
13
+ persistCredentials : true
14
14
- task : ComponentGovernanceComponentDetection@0
15
15
- task : notice@0
16
16
displayName : ' NOTICE File Generator'
@@ -24,18 +24,19 @@ steps:
24
24
echo "3rd-party notices unchanged."
25
25
else
26
26
echo "3rd-party notices changed."
27
+ MESSAGE="Auto-update ThirdPartyNotices.txt"
28
+ if [ "$(git log -1 --pretty=%B | head -n 1)" = "$MESSAGE" ]
29
+ then
30
+ echo "Triggered by own commit, not committing."
31
+ exit 0
32
+ fi
27
33
cp "$PIPELINE_WORKSPACE/NOTICE.txt/NOTICE.txt" ThirdPartyNotices.txt
28
34
git status
29
35
git add ThirdPartyNotices.txt
30
36
git config --global user.email "[email protected] "
31
37
git config --global user.name "Christof Marti"
32
- git commit -m "Auto-update ThirdPartyNotices.txt"
33
- if [ "$(git log -1 --pretty=%B | head -n 1)" != "$(git log HEAD~2..HEAD~1 --pretty=%B | head -n 1)" ]
34
- then
35
- GIT_ASKPASS=scripts/gitAskPass.sh git push origin HEAD:$(Build.SourceBranch)
36
- else
37
- echo "Triggered by own commit, not pushing."
38
- fi
38
+ git commit -m "$MESSAGE"
39
+ git push origin HEAD:$(Build.SourceBranch)
39
40
fi
40
41
env :
41
42
GIT_TOKEN : $(GIT_TOKEN)
You can’t perform that action at this time.
0 commit comments