Accepting request 829911 from openSUSE:Tools

- Fix grammar, update README and .service. Technically the name
  should be changed as well, but that's just cosmetic.

- Also allow working on Chart.yaml

OBS-URL: https://build.opensuse.org/request/show/829911
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-kiwi_metainfo_helper?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2020-09-01 18:05:51 +00:00 committed by Git OBS Bridge
commit 5bb81c68bd
5 changed files with 21 additions and 9 deletions

3
README
View File

@ -2,7 +2,8 @@ obs-service-kiwi_metainfo_helper
================================
This service can be enabled to run during buildtime, when it will edit the
kiwi image description to replace placeholders with build-specific metainfo.
build recipe (.kiwi, Dockerfile, Chart.yaml) to replace placeholders with
build-specific metainfo.
| Placeholder | Value | Example |
|--------------------|--------------------------------------------|-----------------------------------------------------------------------------------------------|

View File

@ -14,8 +14,8 @@ if [ -e "${BUILD_DATA}" ]; then
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
RECIPEFILE="${RECIPEFILE##*:}"
if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ]; then
echo "Recipe is neither Dockerfile nor kiwi - exiting"
if [ "${RECIPEFILE##*.}" != "kiwi" ] && [ "${RECIPEFILE}" != "Dockerfile" ] && [ "${RECIPEFILE}" != "Chart.yaml" ]; then
echo "Recipe is neither Dockerfile, kiwi recipe nor helm chart - exiting"
exit 0
fi
@ -26,9 +26,9 @@ else
RELEASE=0
# Guess the build recipe
files=(*.kiwi Dockerfile*)
files=(*.kiwi Dockerfile* Chart.yaml*)
if [ "${#files}" -eq 0 ]; then
echo "No kiwi or Dockerfile found - exiting"
echo "No kiwi recipe, Dockerfile or helm chart found - exiting"
exit 0
fi
fi

View File

@ -1,4 +1,4 @@
<service name="kiwi_metainfo_helper">
<summary>Substitute various variables in .kiwi files</summary>
<description>Substitutes %DISTURL%, %RELEASE% and %BUILDTIME% in .kiwi files.</description>
<summary>Substitute various variables in build recipes</summary>
<description>Substitutes %DISTURL%, %RELEASE% and %BUILDTIME% in build recipes.</description>
</service>

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Aug 27 07:12:48 UTC 2020 - Fabian Vogt <fvogt@suse.com>
- Fix grammar, update README and .service. Technically the name
should be changed as well, but that's just cosmetic.
-------------------------------------------------------------------
Tue Aug 25 11:10:50 UTC 2020 - Stefan Nica <snica@suse.com>
- Also allow working on Chart.yaml
-------------------------------------------------------------------
Tue Jul 7 13:53:33 UTC 2020 - Fabian Vogt <fvogt@suse.com>

View File

@ -19,7 +19,7 @@
Name: obs-service-kiwi_metainfo_helper
Version: 0.0
Release: 0
Summary: Service for substituting various variables in kiwi recipes
Summary: Service for substituting various variables in build recipes
License: GPL-2.0-or-later
Group: Development/Tools/Building
URL: https://build.opensuse.org
@ -37,7 +37,7 @@ BuildArch: noarch
%description
This service can be used during buildtime to gain access to various variables
in kiwi recipes.
in build recipes.
%prep
%setup -q -D -T -n .