Files
podman/.copr/prepare.sh
baude 69a741817b Test regressions against the RPM spec file
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
2018-08-07 20:23:53 +00:00

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"