-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcopr_script.sh
More file actions
25 lines (21 loc) · 761 Bytes
/
copr_script.sh
File metadata and controls
25 lines (21 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# SPDX-FileCopyrightText: Copyright 2025-2026 The Secureblue Authors
#
# SPDX-License-Identifier: Apache-2.0
# Package dependencies for this script:
# git-core go2rpm go-vendor-tools python3-specfile rpmautospec rpmdevtools
set -eux
VERSION=$(grep -oP -m1 '^Version:\s+\K\S+' crane/crane.spec)
(
cd crane
cp go-vendor-tools.toml ..
rpmautospec process-distgit ./crane.spec ../crane.spec
)
mkdir -p generate_vendor
cp go-vendor-tools.toml generate_vendor
(
cd generate_vendor
go2rpm --name crane --profile vendor --version "${VERSION}" -s pkg/crane https://github.com/google/go-containerregistry/
mv "go-containerregistry-${VERSION}.tar.gz" "go-containerregistry-${VERSION}-vendor.tar.bz2" ..
)
rm -rf crane generate_vendor