From 0ba93061f3cc6df118b89f66e62e2043b512ffba Mon Sep 17 00:00:00 2001 From: Julien Girard <julien.girard2@cea.fr> Date: Fri, 28 Jun 2024 16:07:57 +0200 Subject: [PATCH] [wip] Tentatively add a sanity check for ensuring VERSION and TAG are the same --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2ff04a5..6d27436 100644 --- a/Makefile +++ b/Makefile @@ -38,15 +38,18 @@ view-doc: doc PROJECT_ID=1082 TAG=$(shell dune-release tag -f --yes > /dev/null 2>&1 && git describe --tags --abbrev=0) PKG="caisar-$(TAG).tbz" +REG_VERSION=$(cat VERSION) PACKAGE_URL="https://git.frama-c.com/api/v4/projects/$(PROJECT_ID)/packages/generic/caisar/$(TAG)/$(PKG)" DESCRIPTION="$(shell sed -n -e "p;n;:next;/^##/Q;p;n;b next" CHANGES.md | perl -pe 's/\n/\\n/')" release: + @echo "Are git tag $(TAG) and VERSION file $(REG_VERSION) the same? (y/n)?" + @read yesno; test "$$yesno" = y ./update_version.sh @echo -n $(DESCRIPTION) @echo "Is the CHANGES.md correct for $(TAG) (y/n)?" @read yesno; test "$$yesno" = y - echo $(TAG) > VERSION + @echo $(TAG) > VERSION dune-release tag $(TAG) dune-release distrib --skip-build --skip-lint curl --header "PRIVATE-TOKEN: $(GITLAB_TOKEN)" \ -- GitLab