diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 892fcdebe69fe70023b1501d7b2032eade92cdb6..239321da72c91582570759f48488d92efd193a51 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ variables: CAISAR_VERSION: "2.0.0" - TAG: "2.0" + TAG: "2.0.0" default: interruptible: true diff --git a/Makefile b/Makefile index 578e218cd687cd17ea346ec8da4cad7f9e87d6d3..3b986d520a5742299fc8aff616f8d23dd2e7135a 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,8 @@ release: @echo -n $(DESCRIPTION) @echo "Is the CHANGES.md correct for $(TAG) (y/n)?" @read yesno; test "$$yesno" = y + echo $(TAG) > VERSION + ./update_version.sh dune-release tag $(TAG) dune-release distrib --skip-build --skip-lint curl --header "PRIVATE-TOKEN: $(GITLAB_TOKEN)" \ diff --git a/doc/conf.py b/doc/conf.py index e7f85be9bebfee6103e169fa5e229a6bfefbac7c..44356ae192deb649d56ea115d3fc8cf83a1fdda5 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -29,9 +29,9 @@ author = 'The CAISAR Development Team' # built documents. # # The short X.Y version. -version = '2.0' +version = '2.0.0' # The full version, including alpha/beta/rc tags. -release = '2.0' +release = '2.0.0' # -- General configuration --------------------------------------------------- diff --git a/src/main.ml b/src/main.ml index 9407ee17ec35b62ce1577de9983bc983b8f50762..c9f5e0da80fd32f5fd895412ca972f33a87f3254 100644 --- a/src/main.ml +++ b/src/main.ml @@ -433,7 +433,7 @@ let default_info = `P "Submit bug reports to https://git.frama-c.com/pub/caisar/issues"; ] in - let version = "1.0" in + let version = "2.0.0" in let exits = Cmd.Exit.defaults in Cmd.info caisar ~version ~doc ~sdocs ~exits ~man diff --git a/update_headers.sh b/update_headers.sh deleted file mode 100755 index 9bd23b9513bd556ccb1ca65d5c7665e530fcd1c8..0000000000000000000000000000000000000000 --- a/update_headers.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -xe -NEW_DATE=$(date "+%Y") -OLD_DATE=$(date -d '1 year ago' "+%Y") -find . \( -type d -name .git -prune \) \( -type d -name ._build -prune \) -o -type f -print0 | xargs -0 sed -i 's/(C) '${OLD_DATE}'/(C) '${NEW_DATE}'/g' diff --git a/update_version.sh b/update_version.sh new file mode 100755 index 0000000000000000000000000000000000000000..96e69bc440ff261d17361c49db3b7b969e2b4001 --- /dev/null +++ b/update_version.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -xe + +# Update headers in source files to match current year +NEW_DATE=$(date "+%Y") +OLD_DATE=$(date -d '1 year ago' "+%Y") +find . \( -type d -name .git -prune \) \( -type d -name ._build -prune \) -o -type f -print0 | xargs -0 sed -i 's/(C) '${OLD_DATE}'/(C) '${NEW_DATE}'/g' + +# Update version in manual, ci and main.ml according to the VERSION file +VERSION=$(cat VERSION) +sed -E -i 's/let version = "([0-9]\.)+[0-9]" in/let version = "2.0.0" in/g' src/main.ml +sed -E -i 's/version = \x27([0-9]\.)+[0-9]\x27/version = \x27'${VERSION}'\x27/g' doc/conf.py +sed -E -i 's/release = \x27([0-9]\.)+[0-9]\x27/release = \x27'${VERSION}'\x27/g' doc/conf.py +sed -E -i 's/CAISAR_VERSION: "([0-9]\.)+[0-9]"/CAISAR_VERSION: "'${VERSION}'"/g' .gitlab-ci.yml +sed -E -i 's/TAG: "([0-9]\.)+[0-9]"/TAG: "'${VERSION}'"/g' .gitlab-ci.yml