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

Add mint file #2

Closed
yonaskolb opened this issue Sep 28, 2017 · 11 comments
Closed

Add mint file #2

yonaskolb opened this issue Sep 28, 2017 · 11 comments
Labels

Comments

@yonaskolb
Copy link
Owner

A mint specification file that would list a bunch of swift command line tools with version.
You could run mint install on it and it would install all those versions. Then you could just run mint run tool and it would look up which version should be run from the file

@Lutzifer
Copy link
Contributor

Lutzifer commented Mar 22, 2018

What could this look like?

  • Search in the current path and all parents for a file named .mint-versions
  • if found, exactly match the package (the first parameter after mint run) if no version is specified

When run:

  • look in mint file if a version is specified and take it, otherwise take empty version

File Format (json, as foundation can handle it):

[ 
 {package: "yonaskolb/Mint", version: "0.0.1"},
 {package: "https://github.com/krzysztofzablocki/Sourcery", version: "0.10.1"}
]

@Lutzifer
Copy link
Contributor

Lutzifer commented Apr 1, 2018

@yonaskolb should I have a look at implementing this or do you?

@yonaskolb
Copy link
Owner Author

Hi @Lutzifer
I imagined it as a Mint file that is just a plain text file with each package listed on a newline in a format that's the same as the package argument. Similar to a Carthage Cartfile

yonaskolb/xcodegen@1.8.0
realm/SwiftLint@0.25.0

I didn't think it would search recursively, but just look in the current directory.

I was also considering having a mint install that would install the current package if there was a Package.swift. This would conflict, so this could maybe be mint bootstrap?

If you'd like to create a PR that would be great!

@yonaskolb
Copy link
Owner Author

Also if someone were to run mint run package without a version, we could look for this file in that directory and use the version specified there

@Lutzifer
Copy link
Contributor

Lutzifer commented Apr 4, 2018

Also if someone were to run mint run package without a version, we could look for this file in that directory and use the version specified there

yes, as defined above

@Lutzifer
Copy link
Contributor

Lutzifer commented Apr 4, 2018

on it

yonaskolb added a commit that referenced this issue Apr 6, 2018
Add support for .mintfile (#2)
@Lutzifer
Copy link
Contributor

Lutzifer commented Apr 11, 2018

@yonaskolb we can close this 😃 (unless there are still features missing)

@yonaskolb
Copy link
Owner Author

We'd still need the mint install feature to install all packages in the mint file. Though as mentioned before, because I'd like to in the future also add installing the current directory's package if you're in one, we might use mint install for that instead. The mint file command could then be mint bootstrap instead. What do you think of the names?

@Lutzifer
Copy link
Contributor

bootstrap is a valid name for that I guess

@yonaskolb
Copy link
Owner Author

yonaskolb commented Apr 12, 2018

Ok cool. I'm happy to release this now, and we can add mint bootstrap later.
By the way I added support for specifying just the repo name now in the Mintfile lookup

mint run yonaskolb/xcodegen // from mintfile
mint run xcodegen // also from mintfile

@yonaskolb
Copy link
Owner Author

Mintfile is now released in 0.9.0, and boostrap issue moved to #76

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

No branches or pull requests

2 participants