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

make output type switchable #65

Closed
wants to merge 1 commit into from

Conversation

baronfel
Copy link
Collaborator

Proposed Changes

F# slack has expressed a desire to make an executable from this template.

Types of changes

What types of changes does your code introduce to MiniScaffold?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Build and tests pass locally
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Further comments

I would love to test this but I can't figure out how to uninstall a previous version of the template.
Also the build script seems to be building the inner Content folder, which with this change is no longer buildable, because the output type MyOutputType isn't valid. I didn't see a good way to keep that a buildable value but not accidentally find-and-replace a billion instances of Lib in the project.

@TheAngryByrd
Copy link
Owner

So the giraffe-template build has some permutation tests we could probably imitate with FAKE

@@ -1,4 +1,5 @@
{
"$schema": "http://json.schemastore.org/template",
Copy link
Owner

Choose a reason for hiding this comment

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

Ooo I didn't know about this!

@TheAngryByrd
Copy link
Owner

One of the other issues is that OutputType doesn't directly map to TargetFrameworks anymore

Libs are
netstandard1.6
netstandard2.0
net461

Exe are
netcoreapp1.1
netcoreapp2.0
net461

@TheAngryByrd
Copy link
Owner

Also from slack discussion, we probably need a DotnetPublish target.

https://docs.microsoft.com/en-us/dotnet/core/deploying/deploy-with-cli

Probably projects filtered by src and OutputType = exe and a crossproduct of RuntimeIdentifiers and TargetFrameworks. Then call dotnet publish on those projects

@ScottHutchinson
Copy link
Contributor

Although uninstall with -u does not work, re-installing (as shown below) does update the template to the latest version on nuget. Not sure how how you test a branch though.

dotnet new -i "MiniScaffold::*"

@TheAngryByrd
Copy link
Owner

You should be able to uninstall with dotnet new -u MiniScaffold.

As for testing a branch, you'll have to build it yourself and install the nupkg that resides in the ./dist folder so something like dotnet new -i ./dist/MiniScaffold.0.6.1.nupkg.

@TheAngryByrd
Copy link
Owner

Also looks like we'll need to add a Program.fs or corresponding some entrypoint

@TheAngryByrd
Copy link
Owner

I'm thinking there's enough different here that we'll probably want to create another folder under Content and scaffold up another similar project structure but with things like Argu and dotnet-packaging

@TheAngryByrd
Copy link
Owner

Going to close in favor of #105

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

Successfully merging this pull request may close these issues.

3 participants