generated from demus/basic-rpm-template
Make ignoring unlicensed mods optional
Build and provide rpm of demus-packaging / Start build on COPR (f43) (release) Successful in 4m45s
Build and provide rpm of demus-packaging / Start build on COPR (rawhide) (release) Successful in 4m46s
Build and provide rpm of demus-packaging / Start build on COPR (f44) (release) Successful in 5m31s
Build and provide rpm of demus-packaging / Start build on COPR (f43) (release) Successful in 4m45s
Build and provide rpm of demus-packaging / Start build on COPR (rawhide) (release) Successful in 4m46s
Build and provide rpm of demus-packaging / Start build on COPR (f44) (release) Successful in 5m31s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
%global major 1
|
||||
%global minor 0
|
||||
%global release 4
|
||||
%global release 5
|
||||
|
||||
Name: demus-packaging
|
||||
Version: %{major}.%{minor}.%{release}
|
||||
|
||||
+28
-7
@@ -1,9 +1,30 @@
|
||||
#!/bin/bash
|
||||
# Update go vendor archive and config emulating the way go2rpm does it
|
||||
if [ $# -ne 1 ] || ! [[ "$1" =~ .*.\.spec$ ]] || [ ! -f "$1" ]; then
|
||||
echo "Required spec parameter missing"
|
||||
echo "Usage: go2rpm-vendor-update <specfile>.spec"
|
||||
exit 1
|
||||
# Update go vendor archive and config using the options go2rpm uses
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [OPTION]... <SPEC_FILE>"
|
||||
echo "Update go vendor archive and config for the <SPEC_FILE> using the options go2rpm."
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -u Ignore unlicensed mods"
|
||||
echo " -h Print this message and exit"
|
||||
exit ${1:0}
|
||||
}
|
||||
|
||||
while getopts "uh" flag; do
|
||||
case "$flag" in
|
||||
u) IGNORE_UNLICENSED_ARG=" --ignore-unlicensed-mods";;
|
||||
h) usage;;
|
||||
*) echo "Option $flag is unrecognized"; usage 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
SPEC_FILE="${@:$OPTIND:1}"
|
||||
|
||||
if [ "$SPEC_FILE" == "" ] || ! [[ "$SPEC_FILE" =~ .*.\.spec$ ]] || [ ! -f "$SPEC_FILE" ]; then
|
||||
echo "Required spec parameter missing or not a readable file ending in .spec"
|
||||
usage 1
|
||||
fi
|
||||
go_vendor_archive create --config go-vendor-tools.toml --write-config "$1"
|
||||
go_vendor_license --config go-vendor-tools.toml --path "$1" report --write-config --prompt --autofill auto --update-spec --ignore-unlicensed-mods
|
||||
|
||||
go_vendor_archive create --config go-vendor-tools.toml --write-config "$SPEC_FILE"
|
||||
go_vendor_license --config go-vendor-tools.toml --path "$SPEC_FILE" report --write-config --prompt --autofill auto --update-spec$IGNORE_UNLICENSED_ARG
|
||||
|
||||
+27
-7
@@ -6,19 +6,39 @@
|
||||
|
||||
shopt -s extglob
|
||||
|
||||
if [ $# -ne 1 ] || ! [[ "$1" =~ .*.\.spec$ ]] || [ ! -f "$1" ]; then
|
||||
echo "Please provide one .spec file"
|
||||
echo "Usage: regenerate-from-spec <specfile>.spec"
|
||||
exit 1
|
||||
usage() {
|
||||
echo "Usage: $0 [OPTION]... <SPEC_FILE>"
|
||||
echo "Update generated artifacts belonging to the <SPEC_FILE>."
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -u Ignore unlicensed mods"
|
||||
echo " -h Print this message and exit"
|
||||
exit ${1:0}
|
||||
}
|
||||
|
||||
while getopts ":uh" flag; do
|
||||
case "$flag" in
|
||||
u) IGNORE_UNLICENSED_ARG="-u ";;
|
||||
h) usage;;
|
||||
*) echo "Option $flag is unrecognized"; usage 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
SPEC_FILE="${@:$OPTIND:1}"
|
||||
|
||||
if [ "$SPEC_FILE" == "" ] || ! [[ "$SPEC_FILE" =~ .*.\.spec$ ]] || [ ! -f "$SPEC_FILE" ]; then
|
||||
echo "Required spec parameter missing or not a readable file ending in .spec"
|
||||
echo
|
||||
usage 1
|
||||
fi
|
||||
|
||||
# Ensure remote sources are downloaded
|
||||
spectool -g "$1"
|
||||
spectool -g "$SPEC_FILE"
|
||||
|
||||
# go2rpm creates a go-vendor-tools.toml file when using the vendor profile
|
||||
if grep -q go-vendor-tools.toml "$1"; then
|
||||
if grep -q go-vendor-tools.toml "$SPEC_FILE"; then
|
||||
echo Updating go vendor archive
|
||||
go2rpm-vendor-update "$1"
|
||||
go2rpm-vendor-update "$IGNORE_UNLICENSED_ARG""$SPEC_FILE"
|
||||
fi
|
||||
|
||||
# Update the sources checksums
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SHA512 (go2rpm-vendor-update.sh) = 9ada43dfb76bf35b4bf44beb6c31b683b9e66c27348fa48f52719f92cb1ce8e2a082b3c21784d24caa3fadcd5093a242200dfcd7b39c16e514334c06fb94b5bb
|
||||
SHA512 (go2rpm-vendor-update.sh) = 4613c52afe45075cf696247fa641a6a9849ff3a2b0b821317ec21e7fe26c7974dddf610f775d664869d39844e0dbab198073661817a9941a36db12a9091a936d
|
||||
SHA512 (LICENSE) = ccb0f3b838dff6254510f19c2bd6f5c48e38b8c40a5bf93d38482f4fb31015823741d3f160b6836ec99bd8f4e6c5fa9a5c9196ecdd7775b793f3ada50467aabd
|
||||
SHA512 (macros.demus-packaging) = 8c1218425b20da00e6e67c15d1cf09a5913f74f5b2c14a9fda90d28db228ebc87c85bc2e73018638f94a272c71d310a025dc6893f0c69481126602db5e64ff53
|
||||
SHA512 (README.md) = 72a6f0085fea6d2b5736c4fa98f31db8fb42462db6fe65d44de7e99405982cc2330e270f6fb042d598d4136bd2a933e226ae85fb99828e07af6ab2b74a5c89f2
|
||||
SHA512 (regenerate-from-spec.sh) = 0680e6fdda1c52228eab300c4b9081dc882c3cc3ac96128b2f8e5e9237f3b9126cba094ac9ee3b8fb0778f2f00218704131724c951dc62eb02ec16600e80594b
|
||||
SHA512 (regenerate-from-spec.sh) = af71f4a958d3a5e0fd1b79a0b2305a1bdf893bd5a2647bb054a4e02fe6787f704e4699ce62cda3965f99835e417cb0f331a160fe922cbd689cd79693aa7caaf2
|
||||
|
||||
Reference in New Issue
Block a user