public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 2032034953313b5768e2c1d6671f0713d51dd367 1427 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# PASST - Plug A Simple Socket Transport
#  for qemu/UNIX domain socket mode
#
# PASTA - Pack A Subtle Tap Abstraction
#  for network namespace/tap device mode
#
# contrib/fedora/rpkg.macros - rpkg macros (for COPR builds)
#
# Copyright (c) 2022 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>

function git_version {
	printf "0.git.%s.%s" "$(date -u -I | tr - _)" "$(git rev-parse --short HEAD)"
}

function git_head {
	git rev-parse HEAD
}

function passt_git_changelog_entry {
	__from="${2}"
	__to="${1}"

	[ -z "${__from}" ] && __from="$(git rev-list --max-parents=0 HEAD)"

	__date="$(git log --pretty="format:%cI" "${__to}" -1)"
	__author="$(git log -1 --pretty="format:%an <%ae>" ${__to} -- contrib/fedora)"

	printf "* %s %s - %s\n" "$(date "+%a %b %e %Y" -d "${__date}")" "${__author}" "0.git.${1}-0"

	IFS='
'
	for l in $(git log ${__from}..${__to} --pretty=format:"- %s" -- contrib/fedora); do
		printf "%s%s\n" '-' "${l#*:}"
	done
	unset IFS

	printf "%s Upstream changes: https://passt.top/passt/log/?qt=range&q=%s..%s\n\n" '-' "${__from}" "${__to}"
}

function passt_git_changelog_pairs {
	while [ -n "${2}" ]; do
		passt_git_changelog_entry "${1}" "${2}"
		shift 2
	done

	passt_git_changelog_entry "${1}" ""
}

function passt_git_changelog {
	passt_git_changelog_pairs $((git tag --sort="-v:refname"|tail -n+2; git tag --sort="-v:refname") | sort -r)
}

debug log:

solving 2032034 ...
found 2032034 in https://passt.top/passt

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).