generated from demus/basic-rpm-template
Download remote sources before updating anything
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
%global major 0
|
||||
%global minor 1
|
||||
%global release 2
|
||||
%global release 3
|
||||
|
||||
Name: demus-packaging-utils
|
||||
Version: %{major}.%{minor}.%{release}
|
||||
@@ -14,7 +14,7 @@ Source: macros.demus-packaging
|
||||
Source: LICENSE
|
||||
Source: README.md
|
||||
|
||||
Requires: bash go-vendor-tools
|
||||
Requires: bash go-vendor-tools rpmdevtools
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
# Update various generated artifacts in rpm packages
|
||||
# Update various generated artifacts in rpm packages.
|
||||
# This should be run in the directory containing the spec file.
|
||||
# * Go vendor archive and config
|
||||
# * COPR source file
|
||||
|
||||
@@ -11,6 +12,10 @@ if [ $# -ne 1 ] || ! [[ "$1" =~ .*.\.spec$ ]] || [ ! -f "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure remote sources are downloaded
|
||||
spectool -g "$1"
|
||||
|
||||
# go2rpm creates a go-vendor-tools.toml file when using the vendor profile
|
||||
if grep -q go-vendor-tools.toml "$1"; then
|
||||
echo Updating go vendor archive
|
||||
go2rpm-vendor-update "$1"
|
||||
|
||||
Reference in New Issue
Block a user