Skip to content

Commit

Permalink
Automatic version detection from the ChangeLog file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Ettinger committed Dec 12, 2022
1 parent b52122f commit 934ba4c
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 29 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2022-12-12 opensand-6.1.0

* Added support for packets regeneration (BBFrame or IP) in satellites
* Added the ability to emulate a second satellite with ISL routing

2022-05-18 opensand-6.0.1

* Fix SCPC
Expand Down
3 changes: 1 addition & 2 deletions opensand-conf/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ run autoheader
run automake --add-missing

chmod +x ./configure
./configure --enable-fail-on-warning $@

./configure --enable-fail-on-warning "$@"
3 changes: 2 additions & 1 deletion opensand-conf/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-conf, 6.1.0, [http://opensand.org])
m4_define([opensand_version], m4_bregexp(m4_quote(m4_esyscmd_s([cat ChangeLog])), [[0-9]+\.[0-9]+\.[0-9]+], [\&]))
AC_INIT(opensand-conf, [opensand_version], [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
Expand Down
3 changes: 1 addition & 2 deletions opensand-core/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ run autoheader
run automake --add-missing

chmod +x ./configure
./configure --enable-fail-on-warning $@

./configure --enable-fail-on-warning "$@"
9 changes: 5 additions & 4 deletions opensand-core/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-core, 6.1.0, [http://opensand.org])
m4_define([opensand_version], m4_bregexp(m4_quote(m4_esyscmd_s([cat ChangeLog])), [[0-9]+\.[0-9]+\.[0-9]+], [\&]))
AC_INIT(opensand-core, [opensand_version], [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
Expand Down Expand Up @@ -47,17 +48,17 @@ CXXFLAGS="$CXXFLAGS -std=c++17"


# check for opensand-conf library
PKG_CHECK_MODULES([OPENSAND_CONF], [opensand_conf = 6.1.0])
PKG_CHECK_MODULES([OPENSAND_CONF], [opensand_conf = opensand_version])
LIBS="$OPENSAND_CONF_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_CONF_CFLAGS $AM_CPPFLAGS")

# check for opensand-output library
PKG_CHECK_MODULES([OPENSAND_OUTPUT], [opensand_output = 6.1.0])
PKG_CHECK_MODULES([OPENSAND_OUTPUT], [opensand_output = opensand_version])
LIBS="$OPENSAND_OUTPUT_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_OUTPUT_CFLAGS $AM_CPPFLAGS")

# check for opensand-rt library
PKG_CHECK_MODULES([OPENSAND_RT], [opensand_rt = 6.1.0])
PKG_CHECK_MODULES([OPENSAND_RT], [opensand_rt = opensand_version])
LIBS="$OPENSAND_RT_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_RT_CFLAGS $AM_CPPFLAGS")

Expand Down
9 changes: 6 additions & 3 deletions opensand-core/src/system/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@
#include <opensand_output/OutputEvent.h>
#include <opensand_rt/Rt.h>


constexpr char OPENSAND_VERSION[] = "6.1.0";
#if HAVE_CONFIG_H
#include <config.h>
#else
#define PACKAGE_VERSION "Unknown"
#endif


void usage(std::ostream &stream, const std::string &progname)
Expand Down Expand Up @@ -203,7 +206,7 @@ std::shared_ptr<Entity> Entity::parseArguments(int argc, char **argv, int &retur
}
return nullptr;
case 'V':
std::cout << "OpenSAND version " << OPENSAND_VERSION << std::endl;
std::cout << "OpenSAND version " << PACKAGE_VERSION << std::endl;
return nullptr;
case 'h':
case '?':
Expand Down
13 changes: 11 additions & 2 deletions opensand-network/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@

# Author: Aurélien DELRIEU / <[email protected]>

import re
from setuptools import setup


def version(filename):
with open(filename) as f:
for line in f:
if match := re.search(r'opensand-(\d+\.\d+\.\d+)', line):
return match.group(1)
raise RuntimeError(f'No version found in file {filename}')

from distutils.core import setup

setup(
name='opensand-network',
version='6.1.0',
version=version('ChangeLog'),
author='Viveris Technologies',
author_email='[email protected]',
url="http://opensand.org",
Expand Down
3 changes: 1 addition & 2 deletions opensand-output/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ run autoheader
run automake --add-missing

chmod +x ./configure
./configure --enable-fail-on-warning $@

./configure --enable-fail-on-warning "$@"
3 changes: 2 additions & 1 deletion opensand-output/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-output, 6.1.0, [http://opensand.org])
m4_define([opensand_version], m4_bregexp(m4_quote(m4_esyscmd_s([cat ChangeLog])), [[0-9]+\.[0-9]+\.[0-9]+], [\&]))
AC_INIT(opensand-output, [opensand_version], [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
Expand Down
3 changes: 1 addition & 2 deletions opensand-plugins/encapsulation/gse/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ run autoheader
run automake --add-missing

chmod +x ./configure
./configure --enable-fail-on-warning $@

./configure --enable-fail-on-warning "$@"
5 changes: 3 additions & 2 deletions opensand-plugins/encapsulation/gse/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-gse-encap-plugin, 6.1.0, [http://opensand.org])
m4_define([opensand_version], m4_bregexp(m4_quote(m4_esyscmd_s([cat ChangeLog])), [[0-9]+\.[0-9]+\.[0-9]+], [\&]))
AC_INIT(opensand-gse-encap-plugin, [opensand_version], [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
Expand Down Expand Up @@ -39,7 +40,7 @@ LIBS="$OPENSAND_GSE_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_GSE_CFLAGS $AM_CPPFLAGS")

# check for opensand-plugin library
PKG_CHECK_MODULES([OPENSAND_PLUG], [opensand_plugin = 6.1.0])
PKG_CHECK_MODULES([OPENSAND_PLUG], [opensand_plugin = opensand_version])
LIBS="$OPENSAND_PLUG_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_PLUG_CFLAGS $AM_CPPFLAGS")

Expand Down
3 changes: 1 addition & 2 deletions opensand-plugins/encapsulation/rle/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ run autoheader
run automake --add-missing

chmod +x ./configure
./configure --enable-fail-on-warning $@

./configure --enable-fail-on-warning "$@"
5 changes: 3 additions & 2 deletions opensand-plugins/encapsulation/rle/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-rle-encap-plugin, 6.1.0, [http://opensand.org])
m4_define([opensand_version], m4_bregexp(m4_quote(m4_esyscmd_s([cat ChangeLog])), [[0-9]+\.[0-9]+\.[0-9]+], [\&]))
AC_INIT(opensand-rle-encap-plugin, [opensand_version], [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
Expand Down Expand Up @@ -39,7 +40,7 @@ LIBS="$OPENSAND_RLE_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_RLE_CFLAGS $AM_CPPFLAGS")

# check for opensand-plugin library
PKG_CHECK_MODULES([OPENSAND_PLUG], [opensand_plugin = 6.1.0])
PKG_CHECK_MODULES([OPENSAND_PLUG], [opensand_plugin = opensand_version])
LIBS="$OPENSAND_PLUG_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_PLUG_CFLAGS $AM_CPPFLAGS")

Expand Down
3 changes: 1 addition & 2 deletions opensand-rt/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ run autoheader
run automake --add-missing

chmod +x ./configure
./configure --enable-fail-on-warning $@

./configure --enable-fail-on-warning "$@"
5 changes: 3 additions & 2 deletions opensand-rt/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# Process this file with autoconf to produce a configure script.
AC_INIT(opensand-rt, 6.1.0, [http://opensand.org])
m4_define([opensand_version], m4_bregexp(m4_quote(m4_esyscmd_s([cat ChangeLog])), [[0-9]+\.[0-9]+\.[0-9]+], [\&]))
AC_INIT(opensand-rt, [opensand_version], [http://opensand.org])
AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
Expand Down Expand Up @@ -39,7 +40,7 @@ PKG_PROG_PKG_CONFIG
CXXFLAGS="$CXXFLAGS -std=c++11"

# check for opensand-output library
PKG_CHECK_MODULES([OPENSAND_OUTPUT], [opensand_output = 6.1.0])
PKG_CHECK_MODULES([OPENSAND_OUTPUT], [opensand_output = opensand_version])
LIBS="$OPENSAND_OUTPUT_LIBS $LIBS"
AC_SUBST(AM_CPPFLAGS, "$OPENSAND_OUTPUT_CFLAGS $AM_CPPFLAGS")

Expand Down

0 comments on commit 934ba4c

Please sign in to comment.