Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[DOCS] Simplify workflow examply in README.md #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbuerk
Copy link

@sbuerk sbuerk commented Feb 14, 2025

The README.md contains a GitHub workflow example
for publishing in on pushed tags and extracts from
a annotated tag content created with

git tag -a -m "some content"

filtering the git tag list for the extracted version
and telling to display max 10 lines for the content,
and extracting the tag prefix from the first line
using a sed regexp pattern.

git provides a simpler way using the format option,
which this change adopts in the aforementioned example.

To be precise, following:

git tag -n10 -l ${{ env.version }} | sed "s/^[0-9.]*[ ]*//g"

is replaced with

git tag -l ${{ env.version }} --format '%(contents)'

which displays only the tag content and removes the need
to extract the tag from the first line.

The `README.md` contains a GitHub workflow example
for publishing in on pushed tags and extracts from
a annotated tag content created with

```shell
git tag -a -m "some content"
```

filtering the git tag list for the extracted version
and telling to display max 10 lines for the content,
and extracting the tag prefix from the first line
using a `sed` regexp pattern.

`git` provides a simpler way using the `format` option,
which this change adopts in the aforementioned example.

To be precise, following:

```shell
git tag -n10 -l ${{ env.version }} | sed "s/^[0-9.]*[ ]*//g"
```

is replaced with

```shell
git tag -l ${{ env.version }} --format '%(contents)'
```

which displays only the tag content and removes the need
to extract the tag from the first line.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant