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

Not possible to publish to two branches in one project #86

Closed
ysb33r opened this issue Jun 25, 2020 · 4 comments
Closed

Not possible to publish to two branches in one project #86

ysb33r opened this issue Jun 25, 2020 · 4 comments

Comments

@ysb33r
Copy link

ysb33r commented Jun 25, 2020

I have a use case where I push to to orphaned branches. Currently this is very hard in the way the plugin is authored. If would be nice is where is some way of adding additional grouping of tasks by convention i.e.

gitPublishSets.create 'foo'

and then configure

gitPublish {
  branch = 'pages'
}
gitPublishFoo {
  branch = 'foo'
}

and additional tasks are named gitPublishFooReset, gitPublishFooCopy etc.

@ysb33r
Copy link
Author

ysb33r commented Jun 25, 2020

Just to add, my current workaround is to add an additional subproject and then publish from there. The configuration in the subproject then has to be something like

gitPublish {
    repoUri = rootProject.gitPublish.repoUri

    branch = 'foo'

    contents {
        from "${rootProject.buildDir}/docs/foo", {
            // ...
        }
    }

    commitMessage = "Update FOO for ${project.version}"
}

@ajoberstar
Copy link
Owner

Sure, so some way to configure multiple outputs. Maybe adding a NamedDomainObjectContainer that can cover the settings that are present on the current extension. Leave the existing settings as a proxy for configuring the main publication.

gitPublish {
  // normal top level options
  publications {
    main {
      // same as top level
    }
    foo {
      // options to apply to gitPublishFoo<task>
    }
  }
}

@ajoberstar
Copy link
Owner

See the README for usage details. This is in 4.1.0-rc.1. Let me know if you have any feedback.

@ysb33r
Copy link
Author

ysb33r commented Sep 3, 2024

@ajoberstar Thank you. I have finally started using this. It works really well.

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

No branches or pull requests

2 participants