-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Grunt s3 #1316
Conversation
@@ -2,3 +2,7 @@ | |||
node_modules | |||
.project | |||
dist/ | |||
public/*.js | |||
public/*.min.css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as you are now ignoring all generated files, do we need to have both public and dist for it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dist/
directory is the default setting for the build-gh-pages
grunt plugin. I felt that it was safer to copy all needed files into that and run the gh-pages
task. There is less chance of accidentally destroying non-generated files. It is deleted immediately after deploy to gh-pages.
@@ -2,3 +2,7 @@ | |||
node_modules | |||
.project | |||
dist/ | |||
public/*.js | |||
public/*.min.css | |||
grunt-aws.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, grunt build
fails if this file is not present. We should include a version (without credentials) in master.
Thanks @kenearley. This is pretty nice stuff. I think I prefer this approach to #1315. I'm a little nervous about pulling the JS out of the repo, but I think this will help reduce PR noise (both in our diffs and in people opening PRs without coffee changes). I made a few notes, but I don't think this is too far from merge ready. @koenpunt I'd welcome your feedback on this PR as well. It solves an issue you brought up in #1314. |
I think this is a great solution, as people who only want to use the library don't need the source files, and the ones that want to modify something in Chosen probably know how to clone and use/build the sources. |
Note: The biggest weakness with this workflow is that you have to remember to run the grunt task |
Conflicts: public/chosen.jquery.js public/chosen.jquery.min.js public/chosen.min.css public/chosen.proto.js public/chosen.proto.min.js
Maybe a local githook can solve that problem? |
Certainly a possibility. I think we can live with the annoyance for the time being, though. |
I briefly looked into that. I'd like to dig further, eventually ;) |
Today Github announced a 'Releases' feature: https://github.com/blog/1547-release-your-software maybe that can be another possibility for releasing the zips? |
Ha! Great timing! |
That GitHub releases thing looks interesting, but there doesn't really seem to be a way to automate it. I think we'll merge this as-is and do some experimentation with releases this week. It's possible we can use a little of column A and a little of column B. In the meantime, merging this will make reviews a lot easier. So it's a big +1 from me. |
Conflicts: public/chosen.jquery.js public/chosen.jquery.min.js public/chosen.proto.js public/chosen.proto.min.js
Remove generated assets from repo and add a grunt task to push to S3
Remove generated assets from repo and add a grunt task to push to S3 #1316
Incidentally, the release function makes for a really nice looking changelog. I've added the past few tags and will probably add a few more. https://github.com/harvesthq/chosen/releases |
Nice! |
@pfiller @stof
Here's another take on #1315. Instead of committing the zip file to the repo, it's pushed to s3.
grunt merge
- build all the files, create zip, push to s3, delete zip file.-- Workflow: merge to master, run
grunt merge
, commit and push to GitHub.grunt release
- build all files, update download links inindex.html
create zip, push 2 zip files to s3, delete zip.-- Workflow: merge to master, update the version in
package.json
, rungrunt release
, commit and push to GitHub, create tag and push to GitHub.@pfiller Of course, I will have to give you our s3 credentials when you're ready to test this out.