mirror of
https://github.com/containers/podman.git
synced 2025-09-10 06:22:21 +08:00

We need to make sure we dont break the RPM spec files week-to-week. If we do, the packagers need to have a place to look at what changes are needed to the SPEC so they can pull the changes into the distributions. Signed-off-by: baude <bbaude@redhat.com> Closes: #1230 Approved by: rhatdan
23 lines
581 B
Bash
23 lines
581 B
Bash
#!/bin/sh -euf
|
|
set -x
|
|
|
|
if [ ! -e /usr/bin/git ]; then
|
|
dnf -y install git-core
|
|
fi
|
|
|
|
git fetch --unshallow || :
|
|
|
|
COMMIT=$(git rev-parse HEAD)
|
|
COMMIT_SHORT=$(git rev-parse --short HEAD)
|
|
COMMIT_NUM=$(git rev-list HEAD --count)
|
|
COMMIT_DATE=$(date +%s)
|
|
|
|
sed "s,#COMMIT#,${COMMIT},;
|
|
s,#SHORTCOMMIT#,${COMMIT_SHORT},;
|
|
s,#COMMITNUM#,${COMMIT_NUM},;
|
|
s,#COMMITDATE#,${COMMIT_DATE}," \
|
|
contrib/spec/podman.spec.in > contrib/spec/podman.spec
|
|
|
|
mkdir build/
|
|
git archive --prefix "libpod-${COMMIT_SHORT}/" --format "tar.gz" HEAD -o "build/libpod-${COMMIT_SHORT}.tar.gz"
|