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

It's not possible to disable targets via project.local.yml #1052

Closed
bkosborne opened this issue Feb 8, 2017 · 3 comments
Closed

It's not possible to disable targets via project.local.yml #1052

bkosborne opened this issue Feb 8, 2017 · 3 comments
Labels
Bug Something isn't working

Comments

@bkosborne
Copy link
Contributor

In build.xml, support for disabling specific targets is added like so:

  <!-- Disable targets defined in the disable-targets array in project.yml. -->
  <!-- This must be executed after all targets are defined. -->
  <disabletargets file="${blt.config-files.project}" property="disable-targets"/>

The problem is that it's only considering the main project yml file, and not the project.local.yml file.

Could this be solved by modifying the DisableTargetsTask to just accept the list of targets, instead of a file that lists them? Then you could do something like this:

<if>
  <isset property="disable-targets"/>
  <then>
    <disabletargets targets="${disable-targets}">
  </then>
</if>
@bkosborne
Copy link
Contributor Author

I was working on a PR for this but I'm getting stuck.

When using this <disabletargets targets="${disable-targets}"> in build.xml, the value that gets sent to the target class is literally the string "${disable-targets}" instead of the array of data from the project.yml file.

What do I need to do here to get it to pass the actual value?

@grasmash grasmash added the Bug Something isn't working label Feb 9, 2017
@grasmash
Copy link
Contributor

grasmash commented Feb 9, 2017

Would it work to just add a second line to load from project.local.yml?

  <!-- Disable targets defined in the disable-targets array in project.yml. -->
  <!-- This must be executed after all targets are defined. -->
  <disabletargets file="${blt.config-files.project}" property="disable-targets"/>
  <disabletargets file="${blt.config-files.local}" property="disable-targets"/>

@bkosborne
Copy link
Contributor Author

Yup, confirmed that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants