Skip to content

Fixing build.sh and argument parsing consistency #33

@jnm2

Description

@jnm2

My PR #30 caused build.sh to stop accepting certain argument formattings that it used to accept. I thought cake.exe understood all these forms but it turns out it only understands --target=foo.

Current (breaks some people):

cake.exe build.ps1 build.sh
-t foo ✔️
-t=foo
-t:foo ✔️
-target foo ✔️
-target:foo ✔️
--target foo
--target=foo ✔️ ✔️ ✔️

What we need:

cake.exe build.ps1 build.sh
-t foo ✔️ ✔️
-t=foo
-t:foo ✔️
-target foo ✔️
-target:foo ✔️
--target foo ✔️
--target=foo ✔️ ✔️ ✔️

This is what we used to have. Not having --target Foo broke an NUnit build. The fix (--target=Foo) is easy and IMO preferable but I assume you don't want the break in the first place. Assuming you don't,

  • I need to get a bootstrapper fix in for this.

  • We need to have tests in this repo for this.


What would be cool:

After the immediate fix is taken care of, I propose changing cake.exe so that it understands at least -t foo, -t=foo, and --target foo in addition to --target=foo so that build.sh can go back to not having a special understanding of any arguments beyond --script:

cake.exe build.ps1 build.sh
-t foo ✔️ ✔️ ✔️
-t=foo ✔️ ✔️ ✔️
-t:foo ✔️
-target foo ✔️
-target:foo ✔️
--target foo ✔️ ✔️ ✔️
--target=foo ✔️ ✔️ ✔️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions