mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-23 12:19:43 +00:00
7a3f77e4ad
* Auto update rpm version based on date of last commit Signed-off-by: Andy Neff <andy@visionsystemsinc.com> * Remove test code left behind by accident Signed-off-by: Andy Neff <andy@visionsystemsinc.com> * Use git describe instead Signed-off-by: Andy Neff <andy@visionsystemsinc.com> * Update Dockerfile
19 lines
632 B
Bash
19 lines
632 B
Bash
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
yum-builddep -y /src/rpm/SPECS/darling.spec
|
|
if [ -e "/src/rpm/SOURCES/darling.tar.gz" ]; then
|
|
ln -s /src/rpm/SOURCES/darling.tar.gz /root/rpmbuild/SOURCES/
|
|
else
|
|
# Preparing tarball
|
|
tar --transform "s|^\./|./darling/|" -cf /root/rpmbuild/SOURCES/darling.tar.gz -C /src --exclude=.git --exclude SOURCES --exclude SRPMS --exclude RPMS .
|
|
fi
|
|
ln -s /src/rpm/SOURCES/dkms.conf /root/rpmbuild/SOURCES/
|
|
|
|
DARLING_COMMIT_DATE="$(cd /src; git describe --tags HEAD)"
|
|
export DARLING_COMMIT_DATE="${DARLING_COMMIT_DATE//-/}"
|
|
|
|
#spectool -g -R /src/rpm/SPECS/darling.spec
|
|
rpmbuild -ba /src/rpm/SPECS/darling.spec
|