Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

dotnet-fm does not take into account multiple -t tags #1675

Closed
vmandic opened this issue Sep 15, 2023 · 1 comment
Closed

dotnet-fm does not take into account multiple -t tags #1675

vmandic opened this issue Sep 15, 2023 · 1 comment

Comments

@vmandic
Copy link

vmandic commented Sep 15, 2023

Describe the bug
Running dotnet-fm does not take into account multiple -t tags, all are ignored. Only untagged ones are used.

To Reproduce

dotnet build -v:m -c Release ./App.SqlMigrations -o ./publish \
&& echo "Running SQL migrations..." \
&& DOTNET_ROLL_FORWARD=LatestMajor dotnet fm migrate -p mysql5 \
-a "./publish/App.SqlMigrations.dll" \
-c "$connString" \
-t "Tag1" \
-t "Tag2"

Expected behavior
Bot untagged, and Tag1 and Tag2 C# migrations should be included.

Information (please complete the following information):

  • OS: macos 12.5
  • Platform NET Core SDK 7.0.203
  • FluentMigrator version 3.3.2
  • FluentMigrator runner dotnet-fm
  • Database Management System mysql
  • Database Management System Version mariadb:10.3.37

Additional context
None.

@jzabroski
Copy link
Collaborator

-t | --tag is an IEnumerable and takes a space-separated list of arguments after the initial parameter name, i.e., -t Tag1 Tag2

[Option("-t|--tag", Description = "Filters the migrations to be run by tag.")]

We use Nate McMaster's Command Line library, for which you can read here: https://natemcmaster.github.io/CommandLineUtils/docs/arguments.html#variable-numbers-of-arguments

Note, it is unfortunate the longform name of the parameter is just --tag, it should really be --tags. Happy to accept a PR to the fluentmigrator/documentation repo to provide examples.

@fluentmigrator fluentmigrator locked and limited conversation to collaborators Sep 15, 2023
@jzabroski jzabroski converted this issue into discussion #1676 Sep 15, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants