LengoLabs / qbot

Qbot is an advanced, easy to setup, free, and unbranded Discord-Roblox ranking bot. If at any time during setting it up you need assistance, you can join the support server.
https://discord.gg/J47m7t4
MIT License
77 stars 138 forks source link

Add auto-updating script #91

Closed sv-du closed 2 years ago

sv-du commented 2 years ago

This PR adds a simple script that updates the bot to the latest version. It should be useful for people who want to update quickly with a simple command, which by default, is npm run update

By default, the config file and the package file are exclusions to the updating, but if you wish to change this, leave a comment on the PR

Hopefully this can be merged as I feel like it's a useful feature to have

yogurtsyum commented 2 years ago

Interesting. Out of curiosity, why not just use git fetch && git pull?

sv-du commented 2 years ago

I mostly made it for people who don't know a thing about the Git CLI, and also, to my understanding, it doesn't support exclusions, so let's say you made changes to the main code, or just configured it, won't it overwrite any changes with what the main repo has?

yogurtsyum commented 2 years ago

You can exclude files with .gitignore, and you can still just put git fetch && git pull in the script so people don't need to know how to use the Git CLI.

sv-du commented 2 years ago

Interesting, I thought that .gitignore only worked for pushing files to a repo, seems like I was wrong on that end

Now that you bring that up, this is really just like a reimplementation of the regular git fetch and pull commands