Skip to content

Conversation

djgilcrease
Copy link
Contributor

@djgilcrease djgilcrease commented Jul 31, 2025

  • tag.output is required for mono repo structures if I need to run

    svu n --tag.prefix foo/v --tag.pattern 'foo/v*' --log.directory foo > foo/.version
    svu n --tag.prefix bla/v --tag.pattern 'bla/v*' --log.directory bla > bla/.version
    export BLA_NEXT=$(cat bla/.version)
    export FOO_NEXT=$(cat foo/.version)
    docker tag foo foo:${FOO_NEXT}
    docker tag bla bla:${BLA_NEXT}

    I do not want FOO and BLA _NEXT to have the prefix. So now I can do

    svu n --tag.prefix foo/v --tag.pattern 'foo/v*' --tag.output='v' --log.directory foo > foo/.version
    svu n --tag.prefix bla/v --tag.pattern 'bla/v*' --tag.output='v' --log.directory bla > bla/.version
    export BLA_NEXT=$(cat bla/.version)
    export FOO_NEXT=$(cat foo/.version)
    docker tag foo foo:${FOO_NEXT}
    docker tag bla bla:${BLA_NEXT}
  • fixes consider making config an argument #203 --config to be able to have multiple config files to make monorepo usage easier

  • I made sure the log.directory config entry works as relative to the config path so you can do
    ui-service/.svu.yml ->

    always: true
    tag:
      pattern: ui-service/v*
      prefix: ui-service/v
      output: ''
    log.directory:
      - "../uilib"
      - "."

    OR
    .ui-service.svu.yml ->

    always: true
    tag:
      pattern: ui-service/v*
      prefix: ui-service/v
      output: ''
    log.directory:
      - "uilib"
      - "ui-service"

* tag.strip-prefix is required for mono repo structures
	if I need to run
		```shell
		svu n --tag.prefix foo/v --tag.pattern 'foo/v*' --log.directory foo > foo/.version
		svu n --tag.prefix bla/v --tag.pattern 'bla/v*' --log.directory bla > bla/.version
		export BLA_NEXT=$(cat bla/.version)
		export FOO_NEXT=$(cat foo/.version)
		docker tag foo foo:${FOO_NEXT}
		docker tag bla bla:${BLA_NEXT}
		```
	I do not want FOO and BLA _NEXT to have the prefix

* added --config to be able to have multiple config files to make monorepo usage easier
@caarlos0
Copy link
Owner

caarlos0 commented Aug 8, 2025

I think you can simply set tag.prefix to an empty string 🤔

@djgilcrease
Copy link
Contributor Author

djgilcrease commented Aug 12, 2025 via email

@caarlos0
Copy link
Owner

maybe then we split --tag.prefix into --tag.prefix.input and --tag.prefix.output or something like that?

Or even make it a slice, so it could have --tag.prefix=input,output 🤔

@djgilcrease
Copy link
Contributor Author

maybe then we split --tag.prefix into --tag.prefix.input and --tag.prefix.output or something like that?

I like this, but will do --tag.prefix && --tag.prefix.output, will rework the PR and make output default to --tag.prefix

@pull-request-size pull-request-size bot added size/L and removed size/M labels Aug 19, 2025
@djgilcrease djgilcrease changed the title feat: add tag.strip-prefix bool feat: add tag.output to manage the tag output Aug 19, 2025
@djgilcrease
Copy link
Contributor Author

Updated and it ended up being --tag.output since --tag.prefix.output did not parse properly with --tag.prefix being a string and I felt --tag.prefix.input was ugly AF and would be a breaking change.

Directories []string
Always bool
KeepV0 bool
StripPrefix bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be removed i think

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

Successfully merging this pull request may close these issues.

consider making config an argument
2 participants