Files
demus-packaging/regenerate-from-spec.sh
T
demus 55bdece93f
Build and provide rpm of demus-packaging-utils / Build and deploy an rpm to the demus.dk repo (f44) (release) Successful in 24s
Build and provide rpm of demus-packaging-utils / Build and deploy an rpm to the demus.dk repo (rawhide) (release) Successful in 25s
Switch vendor archive update from alias to command and rename
2026-06-05 16:17:24 +02:00

25 lines
669 B
Bash

#!/bin/bash
# Update various generated artifacts in rpm packages
# * Go vendor archive and config
# * COPR source file
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
fi
if grep -q go-vendor-tools.toml "$1"; then
echo Updating go vendor archive
go2rpm-vendor-update "$1"
fi
# Update the sources checksums
# We assume all files are lowercase except README and LICENSE files
# The spec file itself is excluded
echo Calculating checksums
cksum -a sha512 {[a-z],README*,LICENSE*}!(ources|*.spec) > sources
echo Done