Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(StringUtil): implement format placeholders closer to _posix parameter expansion_ - i.e. implement optional colon #341

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

IvanGrund
Copy link

@IvanGrund IvanGrund commented Oct 15, 2024

My use case is: If branch name is develop, version should be develop-SNAPSHOT. If branch name is feature/JIRA-12345, version should be ~JIRA-12345-SNAPSHOT, so it is alphabeticaly always later (newer). The tilda should be added only if prefix "feature/" is present i.e. ${prefix:+~}.

The problem is, that even if prefix is not defined current implementation creates ${prefix} with empty string, so the overwriting happen. My PR adds possibility to treat empty string as variable not defined.

…meter expansion_ - i.e. implement optional colon
@qoomon
Copy link
Owner

qoomon commented Oct 23, 2024

LGTM

@qoomon qoomon merged commit 9d6ea0d into qoomon:master Oct 23, 2024
1 check passed
@qoomon
Copy link
Owner

qoomon commented Oct 23, 2024

Thx @IvanGrund, feel free to try version 9.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants