From: garciadeblas Date: Tue, 9 Apr 2024 15:36:51 +0000 (+0200) Subject: Disable the check of release notes X-Git-Tag: release-v16.0-start~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F20%2F14320%2F2;p=osm%2Fcommon.git Disable the check of release notes This change also moves the checking of release notes from stage-test.sh to stage-releasenote.sh Change-Id: Ie12290d8aaa9ee057889e4949ccb6c42dffe2cd0 Signed-off-by: garciadeblas --- diff --git a/devops-stages/stage-releasenote.sh b/devops-stages/stage-releasenote.sh new file mode 100755 index 0000000..983b810 --- /dev/null +++ b/devops-stages/stage-releasenote.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e +echo "Skipping the check of the release notes ..." +exit 0 + +echo "Checking the presence of release notes ..." + +nb_rn=$(git diff --diff-filter=A --name-only HEAD~1 |grep "releasenotes\/notes" |wc -l) +if [ "${nb_rn}" -lt 1 ]; then + echo "The commit needs release notes" + echo "Run the following command to generate release notes: tox -e release_notes ''" + echo "Please read README.md for more details" + exit 1 +elif [ "${nb_rn}" -gt 1 ]; then + echo "Only one release notes file should be added in a commit" + exit 1 +fi + +echo "OK. Release notes present in commit" diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 8c684dd..276d0d3 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -12,18 +12,7 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. -set -e + echo Launching tox tox --parallel=auto -echo "Checking the presence of release notes ..." -nb_rn=$(git diff --diff-filter=A --name-only HEAD~1 |grep "releasenotes\/notes" |wc -l) -if [ "${nb_rn}" -lt 1 ]; then - echo "The commit needs release notes" - echo "Run the following command to generate release notes: tox -e release_notes ''" - echo "Please read README.md for more details" - exit 1 -elif [ "${nb_rn}" -gt 1 ]; then - echo "Only one release notes file should be added in a commit" - exit 1 -fi -echo "OK. Release notes present in commit" +