Legacy build scripts, not maintained nor used anymore
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

13 years ago
#!/bin/bash
PACKAGE=$(basename $(pwd))
VERSION=$(rpm -q --qf "%{version}" --specfile $PACKAGE.spec)
ME=$(whoami)
BRANCH=$(git branch | grep '*' | cut -d' ' -f2)
# Generate ChangeLog
git log --format=%H --grep="update changelog" > ignore_hash
git log --format=%H | grep -v -f ignore_hash | git log --pretty --stdin --no-walk > CHANGELOG.git
rm -f ignore_hash
git add CHANGELOG.git
git commit -m 'update changelog' CHANGELOG.git
# Tag GIT using the version in the spec file
13 years ago
git tag $VERSION
# Create needed dirs on the build box
13 years ago
ssh -l $ME build.firewall-services.com mkdir -p rpmbuild/{RPMS,SRPMS,SPECS,SOURCES}
# Generate a tgz archive from the repo
13 years ago
git archive --format=tar.gz --prefix=$PACKAGE-$VERSION/ $BRANCH | ssh -l $ME build.firewall-services.com "cat > rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz"
# Upload the spec file
13 years ago
scp $PACKAGE.spec $ME@build.firewall-services.com:rpmbuild/SPECS/
# And build
13 years ago
ssh -l $ME build.firewall-services.com rpmbuild -bs --nodeps rpmbuild/SPECS/$PACKAGE.spec
ssh -l $ME build.firewall-services.com buildrpm rpmbuild/SRPMS/$PACKAGE-$VERSION-*.src.rpm $1
13 years ago
ssh -l $ME build.firewall-services.com rm -f rpmbuild/SPECS/$PACKAGE.spec rpmbuild/SOURCES/$PACKAGE-$VERSION.tar.gz rpmbuild/SRPMS/$PACKAGE-$VERSION*.src.rpm