Skip to content

Commit

Permalink
ini-file package build (#34774)
Browse files Browse the repository at this point in the history
<!---
Provide a short summary in the Title above. Examples of good PR titles:
* "ruby-3.1: new package"
* "haproxy: fix CVE-2014-123456"
-->

<!--
Please include references to any related issues or delete this section
otherwise.
 -->

Fixes:

Related:

### Pre-review Checklist

<!--
This checklist is mostly useful as a reminder of small things that can
easily be
forgotten – it is meant as a helpful tool rather than hoops to jump
through.

At the moment of this PR you have the most information on what all the
change
will affect, so please take the time to jot it down.

Put an `x` in all the items that apply, make notes next to any that
haven't been
addressed, and remove any items that are not relevant to this PR.

-->

#### For new package PRs only
<!-- remove if unrelated -->
- [ ] This PR is marked as fixing a pre-existing package request bug
- [ ] Alternatively, the PR is marked as related to a pre-existing
package request bug, such as a dependency
- [x] REQUIRED - The package is available under an OSI-approved or
FSF-approved license
- [x] REQUIRED - The version of the package is still receiving security
updates
- [ ] This PR links to the upstream project's support policy (e.g.
`endoflife.date`)

Signed-off-by: Batuhan Apaydin <[email protected]>
  • Loading branch information
developer-guy authored Nov 21, 2024
1 parent 759338e commit baab2ab
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions ini-file.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package:
name: ini-file
version: 1.4.7
epoch: 0
description: CLI tool for modifying .ini files
copyright:
- license: Apache-2.0

pipeline:
- uses: git-checkout
with:
expected-commit: b896bd80ef32cc3feb5a489f0606555169131de8
repository: https://github.com/bitnami/ini-file
tag: v${{package.version}}

- uses: go/build
with:
ldflags: -X main.commit=$(git rev-parse HEAD) -X main.buildDate=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%dT%H:%M:%SZ")
output: ini-file
packages: .

update:
enabled: true
github:
identifier: bitnami/ini-file
strip-prefix: v

test:
pipeline:
# AUTOGENERATED
- runs: |
cat <<ini > expected.ini
[My book]
title=A wonderful book
author=Bitnami
rate=very good
ini
ini-file set --section "My book" --key "title" --value "A wonderful book" ./my.ini
ini-file set -s "My book" -k "author" -v "Bitnami" ./my.ini
ini-file set -s "My book" -k "rate" -v "very good" ./my.ini
# Compare files
if ! diff_output=$(diff -u my.ini expected.ini); then
echo "Files differ:"
echo "$diff_output"
exit 1
else
echo "Files are identical."
fi

0 comments on commit baab2ab

Please sign in to comment.