Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prerelease versioning #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/package-silkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ jobs:
"version": {
"major": 4,
"minor": 0,
"patch": 55,
"suffix": ""
"patch": 56,
"suffix": "rc1"
},
"pkgformat": "deb",
"work_dir": "${{ env.PKG_WORKDIR }}",
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
with:
repository: ${{ inputs.silkit_source_repo }}
submodules: recursive
path: libsilkit4-4.0.55
path: sil-kit
ref: ${{ inputs.silkit_source_ref }}
github-server-url: https://github.com

Expand All @@ -157,7 +157,7 @@ jobs:
{

"SilKitInfo": {
"url": "libsilkit4-4.0.55",
"url": "sil-kit",
"ref": "",
"recursive": true,
"is_local": true
Expand All @@ -166,8 +166,8 @@ jobs:
"version": {
"major": 4,
"minor": 0,
"patch": 55,
"suffix": ""
"patch": 56,
"suffix": "rc1"
},
"pkgformat": "rpm",
"work_dir": "${{ env.PKG_WORKDIR }}",
Expand Down
8 changes: 7 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
libsilkit (4.0.55-1ubuntu1) UNRELEASED; urgency=medium
libsilkit (4.0.56~rc1-1ubuntu1) UNRELEASED; urgency=medium

* New Prerelease

-- Jan Kraemer <[email protected]> Fri, 07 Feb 2025 09:51:24 +0100

libsilkit (4.0.55-1ubuntu1) stable; urgency=medium

* SilKit_LinDataLengthUnknown in the C header Lin.h has been turned into
a define like all the other constants in the C header files.
Expand Down
4 changes: 2 additions & 2 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Upstream-Contact: [email protected]
Source: https://www.github.com/vectorgrp/sil-kit

Files: *
Copyright: 2024 Vector Informatik GmbH
Copyright: 2025 Vector Informatik GmbH
License: Expat

Files: debian/*
Copyright: 2024 Vector Informatik GmbH
Copyright: 2025 Vector Informatik GmbH
License: Expat

Files: ThirdParty/googletest/*
Expand Down
21 changes: 18 additions & 3 deletions rpm/libsilkit4.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
%define version_major 4
%define version_minor 0
%define version_patch 56
%define version_suffix rc1


%if "%{version_suffix}"
%define silkit_version %{version_major}.%{version_minor}.%{version_patch}~%{version_suffix}
%else
%define silkit_version %{version_major}.%{version_minor}.%{version_patch}
%endif

Name: libsilkit4
Version: 4.0.55
Version: %{silkit_version}
Release: %autorelease
Summary: The SIL Framework from Vector
License: MIT
Expand All @@ -17,12 +29,14 @@ An open-source library for connecting Software-in-the-Loop Environments

%package devel
Summary: Develop Files for the libsilkit package
Requires: libsilkit4

%description devel
The development headers and CMake files for libsilkit

%package utils
Summary: SilKit Util Binaries
Requires: libsilkit4

%description utils
Utility programs for libsilkit. Includes
Expand Down Expand Up @@ -57,8 +71,7 @@ install -p -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/
%ctest

%files
%{_libdir}/libSilKit.so.%{version}
%{_libdir}/libSilKit.so.4
%{_libdir}/libSilKit.so.%{version_major}*

%files devel
%{_libdir}/libSilKit.so
Expand All @@ -74,6 +87,8 @@ install -p -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/

%changelog

* Fri Feb 07 2025 Jan Kraemer <[email protected]> - 4.0.56~rc1
- New pre release
* Wed Jan 29 2025 Jan Kraemer <[email protected]> - 4.0.55-1
- SilKit_LinDataLengthUnknown in the C header Lin.h has been turned into
a define like all the other constants in the C header files.
Expand Down
17 changes: 8 additions & 9 deletions scripts/silkit_deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def get_buildinfo(self):
return self.build_info

def source_dir_name(self):
return "sil-kit"
silkit_version = self.build_info.version
source_dir = f"libsilkit{silkit_version.major}-{str(silkit_version)}"
return source_dir

def setup_build_env(self):
try:
Expand Down Expand Up @@ -84,10 +86,7 @@ def __create_orig_tarball(self):
if silkit_version == None:
raise RuntimeError("No valid SilKit Version found! Exiting!")

tarball_name = "libsilkit_{}.{}.{}.orig.tar.gz".format(
silkit_version.major, silkit_version.minor, silkit_version.patch
)

tarball_name = f"libsilkit_{str(silkit_version)}.orig.tar.gz"
try:
subprocess.run(
[
Expand All @@ -96,8 +95,8 @@ def __create_orig_tarball(self):
"-czf",
self.build_info.work_dir / tarball_name,
"-C",
self.build_info.silkit_info.silkit_source_path,
".",
self.build_info.work_dir,
self.source_dir_name(),
],
check=True,
)
Expand All @@ -108,7 +107,7 @@ def __copy_debian_dir(self):
try:
shutil.copytree(
self.build_info.silkit_pkg_path.expanduser() / "debian/",
self.build_info.work_dir / "sil-kit/debian",
self.build_info.work_dir / self.source_dir_name() / "debian",
)
except Exception as ex:
logger.error("Could not copy the debian dir into the sil kit source dir! Exiting")
Expand Down Expand Up @@ -153,7 +152,7 @@ def __build_package(self, build_flags: BuildFlags):

logger.debug(f"CMD LIST: {debuild_cmd}")
logger.debug(f"Calling: {' '.join(debuild_cmd)}")
subprocess.run(debuild_cmd, check=True, cwd=self.build_info.work_dir / "sil-kit/")
subprocess.run(debuild_cmd, check=True, cwd=self.build_info.work_dir / self.source_dir_name())
except Exception as ex:
raise RuntimeError("debuild command failed") from ex

Expand Down
3 changes: 2 additions & 1 deletion scripts/silkit_linux_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def get_silkit_repo(builder: SilKitPKG):

# Copy sil-kit-dir
try:
shutil.copytree(repoPath, build_info.work_dir / repoPath)
version = build_info.version
shutil.copytree(repoPath, build_info.work_dir / f"libsilkit{version.major}-{str(version)}")
except Exception as ex:
logger.error("Could not copy the sil-kit source tree into the workspace dir! Exiting")
logger.debug(f"Python Exception: {str(ex)}")
Expand Down
2 changes: 1 addition & 1 deletion scripts/silkit_pkg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __str__(self):
version_str = f"{self.major}.{self.minor}.{self.patch}"

if self.suffix != None and self.suffix != "":
version_str = version_str + f"{self.suffix}"
version_str = version_str + f"~{self.suffix}"

return version_str

Expand Down
16 changes: 7 additions & 9 deletions scripts/silkit_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ def get_buildinfo(self):

def source_dir_name(self):
silkit_version = self.build_info.version
return "libsilkit{}-{}.{}.{}".format(
silkit_version.major, silkit_version.major, silkit_version.minor, silkit_version.patch
)
source_dir = f"libsilkit{silkit_version.major}-{str(silkit_version)}"
return source_dir

def setup_build_env(self):
try:
Expand Down Expand Up @@ -112,20 +111,19 @@ def __create_tarball(self):
if silkit_version == None:
raise RuntimeError("No valid SilKit version found!")

tarball_name = "libsilkit-{}.{}.{}.tar.gz".format(
silkit_version.major, silkit_version.minor, silkit_version.patch
)
tarball_name = f"libsilkit-{str(silkit_version)}.tar.gz"
try:
subprocess.run(
[
"tar",
"--exclude=.git",
"-czf",
tarball_name,
self.build_info.silkit_info.silkit_source_path.name,
self.build_info.work_dir / tarball_name,
"-C",
self.build_info.work_dir,
self.source_dir_name()
],
check=True,
cwd=self.build_info.work_dir,
)
except Exception as ex:
raise RuntimeError(f"While creating the Source tarball, an error occured!") from ex
Expand Down