forked from pool/obs-service-kiwi_metainfo_helper
Accepting request 946447 from home:fcrozat:branches:openSUSE:Tools
- Generate SOURCEURL based on DISTURL. - Bump version to 0.4 OBS-URL: https://build.opensuse.org/request/show/946447 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_metainfo_helper?expand=0&rev=25
This commit is contained in:
parent
4024e35a8e
commit
0c9465faa1
6
README
6
README
@ -6,8 +6,10 @@ build recipe (.kiwi, Dockerfile, Chart.yaml) to replace placeholders with
|
||||
build-specific metainfo.
|
||||
|
||||
| Placeholder | Value | Example |
|
||||
|--------------------------------------|----------------------------------------------- |------------------------------------------------------------------------------------------------|
|
||||
| %DISTURL% | The OBS dist url | obs://build.suse.de/SUSE:SLE-15:Update:CR/images/2951b67133dd6384cacb28203174e030-sles15-image |
|
||||
|--------------------------------------|----------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------|
|
||||
| %DISTURL% | The OBS dist url | obs://build.opensuse.org/openSUSE:Factory/images/0f40c57dd619e1dff9e512949b6bca09obs-opensuse-tumbleweed-image |
|
||||
| %SOURCEURL% | Source url for container recipe (OBS) | https://build.opensuse.org/package/show/openSUSE:Factory/opensuse-tumbleweed-image?rev=0f40c57dd619e1dff9e512949b6bca09 |
|
||||
| %SOURCEURL% | Source url for container recipe (IBS) | https://sources.suse.com/SUSE:SLE-15:Update:CR/sles15-image/2951b67133dd6384cacb28203174e030/ |
|
||||
| %RELEASE% | The OBS release number (<cicnt\>.<bldcnt\>) | 4.2 |
|
||||
| %BUILDTIME% | $(date --utc +%FT%T.%NZ) | 2018-10-30T09:19:02.074934628Z |
|
||||
| %OS_VERSION_ID% | VERSION_ID in the os-release file | 15 |
|
||||
|
@ -21,6 +21,16 @@ if [ -e "${BUILD_DATA}" ]; then
|
||||
fi
|
||||
|
||||
files=("${RECIPEFILE}")
|
||||
# generate %SOURCEURL% based on DISTURL with a special case for build.suse.de
|
||||
prj=$(echo ${DISTURL} | cut -d/ -f4)
|
||||
localpath=$(echo ${DISTURL} | cut -d/ -f6-)
|
||||
rev=$(echo ${localpath} | cut -d- -f1)
|
||||
packagename=$(echo ${localpath} | cut -d- -f2-)
|
||||
if [[ "${DISTURL}" == obs://build.suse.de/* ]]; then
|
||||
SOURCEURL="https://sources.suse.com/${prj}/${packagename}/${rev}/"
|
||||
else
|
||||
SOURCEURL="https://$(echo ${DISTURL} | cut -d/ -f3)/package/show/${prj}/${packagename}?rev=${rev}"
|
||||
fi
|
||||
else
|
||||
echo "Warning: No build data found - chroot build?"
|
||||
DISTURL="local"
|
||||
@ -112,5 +122,6 @@ fi
|
||||
|
||||
sed -i"" \
|
||||
-e "s#%DISTURL%#${DISTURL}#g" \
|
||||
-e "s#%SOURCEURL%#${SOURCEURL}#g" \
|
||||
-e "s/%RELEASE%/${RELEASE}/g" \
|
||||
-e "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" "${files[@]}"
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 13 09:32:09 UTC 2022 - Frederic Crozat <fcrozat@suse.com>
|
||||
|
||||
- Generate SOURCEURL based on DISTURL.
|
||||
- Bump version to 0.4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 2 14:23:53 UTC 2021 - Jeff Kowalczyk <jkowalczyk@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package obs-service-kiwi_metainfo_helper
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: obs-service-kiwi_metainfo_helper
|
||||
Version: 0.3
|
||||
Version: 0.4
|
||||
Release: 0
|
||||
Summary: Service for substituting various variables in build recipes
|
||||
License: GPL-2.0-or-later
|
||||
|
Loading…
Reference in New Issue
Block a user