Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
a0c425d3
Commit
a0c425d3
authored
Mar 07, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git: add version_to_tag/tag_to_version for ~ and + in versions
parent
15eb98fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
git
share/eterbuild/functions/git
+14
-0
No files found.
share/eterbuild/functions/git
View file @
a0c425d3
...
...
@@ -151,6 +151,20 @@ get_last_tag()
git describe
--abbrev
=
0
--tags
2>/dev/null
}
# Convert package version to valid git tag name
# RPM allows ~ and + in versions, but git tags cannot contain ~
# (git interprets ~ as ancestor reference)
version_to_tag
()
{
echo
"
$1
"
|
sed
-e
's|~|.tilde.|g'
-e
's|+|.plus.|g'
}
# Convert git tag name back to package version
tag_to_version
()
{
echo
"
$1
"
|
sed
-e
's|\.tilde\.|~|g'
-e
's|\.plus\.|+|g'
}
# check if tag is last commit tag (put on the last commit). if tag is missed, check with the last tag in repo
is_last_commit_tag
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment