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

Generate paket.lock for all possible template options #139

Merged
merged 26 commits into from
Aug 10, 2018

Conversation

theimowski
Copy link
Member

@theimowski theimowski commented Aug 6, 2018

The idea here is to write couple of Fake helper targets for dealing with various paket.lock files in the template.
Because the paket.lock will always have 3 groups:

  • Build
  • Client
  • Server

we can treat each of the group separately to minimize total number of paket.lock permutations.

Workflow in this PR for working with paket.lock

  • GenPaketLockFiles Fake target can generate lock files for representative number of template options, split it for each group and save in ./Content/{Group} directory
  • BuildPaketLockFiles can take the lock files from corresponding ./Content/{Group} dirs and build all permutations of lock files in ./Content. This target is now dependency of Pack target
  • RemovePaketLockFiles occurs after Pack target so that the git repo is not littered with generated paket.lock files
  • GenJsonDefinitions target can be invoked to print conditions needed to be placed into template.json manifest
  • UpdatePaketLockFiles updates all paket lock files (can pass in specific group name(s) as target parameter)

Refers to #66

@theimowski theimowski changed the title [WIP] Generate paket.lock for all possible template options Generate paket.lock for all possible template options Aug 8, 2018
@isaacabraham
Copy link
Member

Looks very interesting! Will this generate the lock files in advance or when people create a new project from the template?

@theimowski
Copy link
Member Author

it creates the lock files before packaging up the NuGet, so they are present in the template already

@isaacabraham
Copy link
Member

How many are there currently?

@theimowski
Copy link
Member Author

theimowski commented Aug 8, 2018

type ServerPaketDependency = Saturn | Giraffe | Suave

type CombinedPaketDependencies =
    { Azure : bool
      Remoting : bool
      Fulma : bool
      Server : ServerPaketDependency }

3 x 2 x 2 x 2 = 24

EDIT: wrong snippet

@theimowski theimowski merged commit 3bb20ab into SAFE-Stack:master Aug 10, 2018
@theimowski theimowski deleted the paket_lock branch August 10, 2018 12:15
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.

2 participants