5HT / fs

📁 FS: Windows, Linux, Mac Driver
https://fs.n2o.dev
Other
235 stars 69 forks source link

Add package.exs #10

Closed josevalim closed 9 years ago

josevalim commented 9 years ago

Folks, this is a pull request that adds a package.exs file so the package can be published to hex.

We are planning to use it as a Phoenix dependency in the upcoming release so if you could merge this PR and publish the package, we would really appreciate it.

Note we cannot add a mix.exs because we want the package to be treated as a rebar depndency in order to compile the c sources.

Publishing the package can be done with:

MIX_ENV=package.exs mix hex.publish

Let me know if you have any questions and thanks! :heart:

5HT commented 9 years ago

enjoy!

josevalim commented 9 years ago

Thank you! Have you published the package to Hex? Or would you prefer if we did it?

5HT commented 9 years ago

Show me how with fs and I will publish to hex the rest of our tools :-)

josevalim commented 9 years ago

Right now you need to have Elixir installed. Once you do run mix local.hex and then register yourself.

Once registered, just run: MIX_ENV=package.exs mix hex.publish

5HT commented 9 years ago

I've published https://hex.pm/packages/fs but only after renaming package.exs to mix.exs

5HT commented 9 years ago

Ah what a pity: https://hex.pm/packages/sh already exists :-(

josevalim commented 9 years ago

I've published https://hex.pm/packages/fs but only after renaming package.exs to mix.exs

Please don't rename it to mix.exs otherwise the rebar commands won't install. Which trouble did you run into by using MIX_ENV=package.exs mix hex.publish?

5HT commented 9 years ago

both rebar compile and mad compile are ok with mix.exs

$ MIX_ENV=package.exs mix hex.publish
** (Mix) Could not find a Mix.Project, please ensure a mix.exs file is available
josevalim commented 9 years ago

Actually, it worked because mix.exs was not included. We had some problems with the version though, I will send a new pull request. :)

josevalim commented 9 years ago

@5HT ah, yes. I meant using rebar through mix. :)

josevalim commented 9 years ago

Ugh, I am sorry, the command should be:

MIX_EXS=package.exs mix hex.publish

I have used MIX_ENV out of habit.

5HT commented 9 years ago

Now I have this:

Proceed? [Yn]
[#########################] 100%Pushing fs v0.9.0 failed
Validation failed (422)
Validation failed
  created_at: can only modify a release up to one hour after creation
josevalim commented 9 years ago

Yes. Because you already published it. :) I sent a new PR with a new version that also follows semantic versioning.

5HT commented 9 years ago

fs always will have our versioning: N.M.O where N.M means Years.Months after birth and O is always zero.

5HT commented 9 years ago

Now is ok, I've updated the https://hex.pm/packages/fs