-
Notifications
You must be signed in to change notification settings - Fork 209
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
Discuss: workflow for managing Dist files (i.e. on a 'stable' branch) #773
Comments
Thanks for opening your first issue here! Please follow the issue template to help us help you 👍🎉😄 |
demo
folder.
@dojutsu-user great thoughts. |
@dojutsu-user there has been a lot of discussion about managing dist files. I think the decision was to create a pre-commit hook to ensure that nothing wrong is committed. |
@Divy123
Many github repositories (like elasticsearch: https://github.com/elastic/elasticsearch/) also use separate branches for maintaining their different releases. |
@dojutsu-user your idea of separate branches is pretty cool. I had suggested doing that before but @jywarren said that cloning the repo and having the code ready is much better than building it manually or pulling from somewhere else. What do you think? |
@harshkhandeparkar
|
@dojutsu-user that is not what @jywarren meant(i think). What he meant was that adding dist to gitignore would create problem. Since the code version is not bumped very often, the code is not linked on github releases. jywarren wants the users yo be able to clone/zip the repo and have the latest dist readily available. |
@harshkhandeparkar Let's see his thoughts on this. |
Sure 😊 |
Cool examples dojutsu-user. |
Divy123 sometimes people prioritize their emails by whether they are tagged or not. If they are tagged earlier, they will receive the email even if they wre not concerned so it is a good way to sort/prioritize. Also I don't like referencing people by name, rather by username. Thanks. |
Sorry closed by mistake. |
Hi, all, there are a few different threads here, and I do want to bring the discussion back to #601 where we talk about how to manage dist files. One suggestion there was to not ask for dist files on each commit, and to just generate them periodically. If we want to /also/ have a discussion about an alternative branch, the plots2 project (https://github.com/publiclab/plots2/) uses a We could consider the |
And -- thank you!!!!! |
That would be great to have a stable branch to deploy and I think that could make the maintenance work divided and cleaner. |
@jywarren |
We can discuss on gitignoring dist files. Moved the pre-commit hook discussion to this issue. |
OK, I've opened a documentation issue to clarify the policy on submitting dist files to PRs (i.e. you don't have to anymore, and I'll compile them in periodically). I think we can do this without But is it something we could share responsibility for, and is it something we could manage via PRs? What if anyone in @publiclab/is-reviewers could open a PR with built files from
Anything else? Thank you all! |
1 similar comment
OK, I've opened a documentation issue to clarify the policy on submitting dist files to PRs (i.e. you don't have to anymore, and I'll compile them in periodically). I think we can do this without But is it something we could share responsibility for, and is it something we could manage via PRs? What if anyone in @publiclab/is-reviewers could open a PR with built files from
Anything else? Thank you all! |
If the tasks listed above are done by running commands, I can create scripts for those like the one created in #857 |
So summary, i think our options are:
|
Oops not at all. I mean that we will always push dist files to npm and branch tags. What will be the latest on npm will be on stable. What will be on main will be on a new |
Oh ok thanks, so that is pretty close to (2) above, right? |
I don't think clean git history is a requirement (in my opinion it isn't) because people(users) will only pull the stable branch, they won't care about the history, for a history they can have a look at the main branch commit history. For managing files and npm publishes, I can create a script for you so that you can open your terminal, tyoe one command, type your username and password. Done. What OS do you use? |
Not really, it is a mix of both. So I mean that we never push dist files to main. |
Oh, so where do we build them? Maybe I don't exactly follow |
Whoa... just noting: since we started including puppeteer... but yeah, cool! @tech4GT so did you say this actually uses the dist files locally in |
We have to install pupeteer and other deps anyways. For that we use the setup script. The setup script already builds dist files. |
Well, some people may use |
Unstable branch(which we need to create) can hold the latest beta. We will build dist files here. After each PR, we can push to this branch. Or at least once every 2 to 3 PRs. I can semi-automate this using a script. Only barrier between fully automated and semi-automated(you will have to run the command) is authentication. Ok. I can create a highly specialised script with different options for npm pushes, unstable pushing, etc. Each time you push to npm, it will also push to stable. This will only be done when bumping npm version. I love writing scripts(I had mentioned harshith's update-is before). So, what OS do you use? |
I use Linux but sorry @harshkhandeparkar i just don't want to make work for you on script writing before we've come to a consensus on this. Thanks! |
Also, shouldn't we try to write an NPM script that would be cross-platform? But i think we may be getting ahead of the goal here, which is to decide a workflow. Can you tell a bit about the disadvantages you see to including |
Ok. Pros and cons of not having dist files:(in my opinion) Pros
Cons
We can actually manage the dist files building on main(when it is freshly pulled) by documenting it properly. We can directly link to stable branch in the docs wherever it links to dist files. |
Yes that can be done. |
Pros and cons of having dist files: Pros
Cons
|
This is really helpful. Let's hear from some others now. Thanks, Harsh! |
Sure. |
Majority opinion should be full and final. |
Just found this guide to making gh-pages build from Travis! “Automate deployment of projects to GitHub-pages using Travis CI” by Dhruv Barochiya https://link.medium.com/9wOQZZr4JX |
@jywarren I would then suggest that, we keep a beta branch for all the dev work and only push to master on releases. We don't want buggy code to get deployed. |
@tech4GT what do you mean by dev-work? |
I mean the any new code should be pushed to the beta branch first! It should actually get deployed with the next release. |
We have a beta branch on Harshith's repo. The code is pushed to it either by me or him. |
@publiclab/is-maintainers Should we close this now? |
sounds good! |
A new
demo
folder should be created, containg the deployment code, so that each timedist
folder does not raisesMerge Conflict
errors.demo
folder or a separate branch can be created from where the code can be deployed. This will ensure that if any wrong code commited tomain
branch does not get deployed immediately.Merge Conflicts
with thedist
files.dist
folder should be added to.gitignore
.What's your thought on this? @jywarren @tech4GT
The text was updated successfully, but these errors were encountered: