logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 6aa9b023f04e3151c85591ac02796c4536fa7958
parent f8566e91a69571ae0b9d49867c844eeb575786f0
Author: Tusooa Zhu <tusooa@kazv.moe>
Date:   Sun, 28 Aug 2022 11:13:36 -0400

Use dedicated script

Diffstat:

M.gitlab-ci.yml21+--------------------
Atools/check-changelog22++++++++++++++++++++++
2 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml @@ -48,26 +48,7 @@ check-changelog: after_script: '' cache: {} script: - - echo $CI_MERGE_REQUEST_IID - - > - ls changelog.d - count=0 - for i in add remove fix security skip; do - [ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ] - retcode=$? - if [ $retcode -eq 0 ]; then - echo "found $CI_MERGE_REQUEST_IID.$i" - else - echo "no $CI_MERGE_REQUEST_IID.$i" - fi - count=$(( $count + 1 - $retcode )) - done - if [ $count -eq 1 ]; then - echo "ok" - else - echo "must have a changelog entry or explicitly skip it" - exit 1 - fi + - sh ./tools/check-changelog build: stage: build diff --git a/tools/check-changelog b/tools/check-changelog @@ -0,0 +1,22 @@ +#!/bin/sh + +echo $CI_MERGE_REQUEST_IID +ls changelog.d +count=0 +for i in add remove fix security skip; do + [ -f changelog.d/"$CI_MERGE_REQUEST_IID"."$i" ] + retcode=$? + if [ $retcode -eq 0 ]; then + echo "found $CI_MERGE_REQUEST_IID.$i" + else + echo "no $CI_MERGE_REQUEST_IID.$i" + fi + count=$(( $count + 1 - $retcode )) +done +if [ $count -eq 1 ]; then + echo "ok" + exit 0 +else + echo "must have a changelog entry or explicitly skip it" + exit 1 +fi