From 633164618149a3f728115d743cc16a29e11c41a3 Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sat, 5 Oct 2024 11:03:35 +0200 Subject: [PATCH] fix: create CHANGELOG.md if not already existing --- Release.gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Release.gitlab-ci.yml b/Release.gitlab-ci.yml index dd683ca..840515b 100644 --- a/Release.gitlab-ci.yml +++ b/Release.gitlab-ci.yml @@ -75,6 +75,13 @@ handle_mr: -H "Content-Type: application/json" \ --data "${BODY}" \ "https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/repository/files/CHANGELOG%2Emd" + if [ $? -ne 0 ]; then + curl -s -X POST \ + -H "Authorization: Bearer ${UNBOUND_RELEASE_TOKEN}" \ + -H "Content-Type: application/json" \ + --data "${BODY}" \ + "https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/repository/files/CHANGELOG%2Emd" + fi if [ -n "${MR}" ]; then echo "Updating existing MR" echo "Rebasing branch"