From c03dee957db64e8fd62acf180c6aa89bcc22d777 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Mon, 15 Jul 2024 21:12:30 +0100 Subject: [PATCH] better and more consistent semver --- Dockerfile.remote | 2 +- sbin/exabgp | 4 ++-- src/exabgp/version.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.remote b/Dockerfile.remote index 45801b763..ca9dd7d50 100644 --- a/Dockerfile.remote +++ b/Dockerfile.remote @@ -40,7 +40,7 @@ RUN echo "user = 'exa'" >> /opt/exabgp/etc/exabgp/exabgp.env RUN cd /tmp \ && echo Building ${version} \ && pip install -U setuptools \ - && env EXABGP_VERSION=`date +%Y.%m.%d` pip install git+https://github.com/Exa-Networks/exabgp.git@${version} + && env EXABGP_VERSION=5.0.0-`date +%Y%m%d`+uncontrolled pip install git+https://github.com/Exa-Networks/exabgp.git@${version} WORKDIR /etc/exabgp diff --git a/sbin/exabgp b/sbin/exabgp index 5f64ddea4..2b9963fd7 100755 --- a/sbin/exabgp +++ b/sbin/exabgp @@ -10,10 +10,10 @@ if [ $? -eq 0 ]; then if [ $GIT_TAG -eq 0 ]; then GIT_BRANCH=`git branch | grep "*" | awk '{ print $2}'` GIT_COMMIT=`git rev-parse --short=10 HEAD` - export EXABGP_VERSION="$(date +%Y.%m.%d)-${GIT_BRANCH}-${GIT_COMMIT}" + export EXABGP_VERSION="5.0.0-$(date +%Y%m%d)+${GIT_BRANCH}-${GIT_COMMIT}" fi else - export EXABGP_VERSION="$(date -r $0 +%Y.%m.%d)-uncontrolled" + export EXABGP_VERSION="5.0.0-$(date -r $0 +%Y%m%d)+uncontrolled" fi diff --git a/src/exabgp/version.py b/src/exabgp/version.py index aacaf9f9e..1c8b22414 100644 --- a/src/exabgp/version.py +++ b/src/exabgp/version.py @@ -3,7 +3,7 @@ from datetime import datetime commit = "99de31e8" -release = "5.0.0dev%s" % datetime.now().strftime('%Y%m%d%H%M%S') +release = "5.0.0-%s+uncontrolled" % datetime.now().strftime('%Y%m%d') json = "5.0.0" text = "5.0.0" version = os.environ.get('EXABGP_VERSION', release)