Profiles and data used to compile packages for EOLE distribution

This commit is contained in:
2025-08-04 11:34:29 +02:00
parent d87e587a45
commit 9305b1c161
146 changed files with 324 additions and 5 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash
cd src
if [ -f debian/changelog ] || [ ! -d .git ]; then
tamarin_info "Not a Git repository or Debian changelog already exists !"
@ -35,6 +36,12 @@ fi
touch debian/changelog
project_name=$(tamarin_db get project_name)
if [ -z "$project_name" ]
then
tamarin_info "The project name is empty"
project_name=$(cat debian/control | awk '/Source:/ {print $2}')
fi
tamarin_info "The project name: $project_name"
distribution=$(tamarin_db get distribution UNRELEASED)
urgency=$(tamarin_db get urgency low)
package_level=$(tamarin_db get package_level dev)
@ -113,7 +120,7 @@ function get_distribution_from_tag {
}
function get_previous_release_tag {
# Return previous pkg/* tag or current tag if no previous pkg/* exists.
# Return previous release/* tag or current tag if no previous release/* exists.
commit="$1"
echo "$(git describe --abbrev=0 --always --match='release/*' $commit)"
}
@ -181,16 +188,17 @@ function packager_from_commit {
}
function next_version {
set -x
commit="$1"
# upstream version is given by most recent of release or pkg tag
previous_pkg="$(git describe --long --match='pkg/*' $commit 2>/dev/null)"
previous_short_pkg="$(git describe --abbrev=0 --match='pkg/*' $commit 2>/dev/null)"
previous_release="$(git describe --long --match='release/*' $commit 2>/dev/null)"
previous_release_from_pkg="$(git describe --long --match='release/*' $previous_short_pkg 2>/dev/null)"
if [ -n "$previous_release" ] && [ -n "$previous_pkg" ]
then
distance_from_pkg=$(get_distance_from_tag "$previous_pkg" "$commit")
distance_from_release=$(get_distance_from_tag "$previous_release" "$commit")
if [ $distance_from_release -le $distance_from_pkg ]
if [ $distance_from_release -le $distance_from_pkg ] || [ "$(get_upstream_version_from_tag $previous_release)" != "$(get_upstream_version_from_tag $previous_release_from_pkg)" ]
then
distance=$distance_from_release
version="$(get_upstream_version_from_tag $previous_release)-1"
@ -214,10 +222,9 @@ function next_version {
fi
if [ "$package_level" = 'dev' ] || [ "$package_level" = 'staging' ]
then
version="${version}~${package_level}+${distance}"
version="${version}~${package_level}+${distance}~g$(git rev-parse --short ${commit})"
fi
echo $version
set +x
}
function gen_changelog_entry {