Files
podman/rpm/update-spec-version.sh
Lokesh Mandvekar 85b4c896bd [CI:BUILD] Packit: set propose-downstream action type to pre-sync
Also address review concerns in pr#18675.

[NO NEW TESTS NEEDED]

Co-authored-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-05-25 09:26:35 -04:00

14 lines
394 B
Bash

#!/usr/bin/env bash
# This script will update the Version field in the spec which is set to 0 by
# default. Useful for local manual rpm builds where the Version needs to be set
# correctly.
set -e
SPEC_FILE=$(pwd)/podman.spec
LATEST_TAG=$(git tag --sort=creatordate | tail -1)
LATEST_VERSION=$(echo $LATEST_TAG | sed -e 's/^v//')
sed -i "s/^Version:.*/Version: $LATEST_VERSION/" $SPEC_FILE