Skip to content
Snippets Groups Projects
Commit 67c14bfd authored by Mihai Patrascoiu's avatar Mihai Patrascoiu
Browse files

Small changes to build setup:

- Add print info function to build script
- Minor fixes to repo manager script
parent 63af924b
No related branches found
No related tags found
No related merge requests found
Pipeline #3020467 passed
#!/usr/bin/env bash
set -e
function print_info {
printf "======================\n"
printf "Distribution:\t%s\n" "$(rpm --eval "%{dist}" | cut -d. -f2)"
printf "Branch:\t\t%s\n" "${BRANCH}"
printf "Release:\t%s\n" "${RELEASE}"
printf "======================\n"
}
TIMESTAMP=`date +%y%m%d%H%M`
GITREF=`git rev-parse --short HEAD`
BRANCH=`git name-rev $GITREF --name-only`
......@@ -10,6 +18,8 @@ if [[ $BRANCH == tags/* ]]; then
RELEASE=
fi
print_info
RPMBUILD=${PWD}/build
SRPMS=${RPMBUILD}/SRPMS
......
......@@ -32,6 +32,7 @@ def add_dependency(parser, when_present, dependency):
parser.error("argument --{0} is required when --{1} is present".format(dependency, when_present))
def declare_required(parser, args, choice):
choice = choice.replace("-", "_")
if not hasattr(args, choice):
parser.error("argument --{0} is required".format(choice))
......@@ -126,7 +127,7 @@ class Repository(object):
raise ValueError("Cannot mix packages of different platforms in the same invocation: {0}".format(list(platforms)))
archs = set([x.arch for x in packages])
archs.remove(None)
archs.discard(None)
if len(archs) != 1:
raise ValueError("Cannot mix packages of different architectures in the same invocation: {0}".format(list(archs)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment