github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/docs/updating.md (about)

     1  # Updating Gosora (Windows)
     2  
     3  The update system is currently under development, but you can run `dev-update.bat` to update your instance to the latest commit and to update the associated database schema, etc.
     4  
     5  If you run into any issues doing so, please open an issue: https://github.com/Azareal/Gosora/issues/new
     6  
     7  If you want to manually patch Gosora rather than relying on the above scripts to do it, you'll first want to save your changes with `git stash`, and then, you'll overwrite the files with the new ones with `git pull origin master`, and then, you can re-apply your custom changes with `git stash apply`
     8  
     9  After that, you'll need to run `go build ./patcher`.
    10  
    11  Once you've done that, you just need to run `patcher.exe` to apply the latest patches to the database, etc.
    12  
    13  # Updating a software with a simple installation (Linux)
    14  
    15  The update system is currently under development, but you can run `dev-update-linux` to update your instance to the latest commit and to update the associated database schema, etc.
    16  
    17  If you run into any issues doing so, please open an issue: https://github.com/Azareal/Gosora/issues/new
    18  
    19  If you want to manually patch Gosora rather than relying on the above scripts to do it, you'll first want to save your changes with `git stash`, and then, you'll overwrite the files with the new ones with `git pull origin master`, and then, you'll re-apply your changes with `git stash apply`.
    20  
    21  After that, you'll need to run `go build -o Patcher "./patcher"`
    22  
    23  Once you've done that, you just need to run `./Patcher` to apply the latest patches to the database, etc.
    24  
    25  
    26  # Updating a software using systemd (Linux)
    27  
    28  You will first want to follow the instructions in the section for updating dependencies.
    29  
    30  The update system is currently under development, but you can run `quick-update-linux` in `/home/gosora/src`to update your instance to the latest commit and to update the associated database schema, etc.
    31  
    32  If you run into any issues doing so, please open an issue: https://github.com/Azareal/Gosora/issues/new
    33  
    34  If you're using a systemd service, then you might want to switch to the `gosora` user with `su gosora` (you may be prompted for the password to the user), you can switch back by typing `exit`.
    35  If this is the first time you've done an update as the `gosora` user, then you might have to configure Git, simply do:
    36  
    37  `git config --global user.name "Lalala"`
    38  `git config --global user.email "lalala@example.com"`
    39  
    40  Replace that name and email with whatever you like. This name and email only applies to the `gosora` user. If you see a zillion modified files pop-up, then that is due to you changing their permissions, don't worry about it.
    41  
    42  If you get an access denied error, then you might need to run `chown -R gosora /home/gosora` and `chgrp -R www-data /home/gosora` (with the corresponding user you setup for your instance) to fix the ownership of the files.
    43  
    44  If you want to manually patch Gosora rather than relying on the above scripts to do it, you'll first want to save your changes with `git stash`, and then, you'll overwrite the files with the new ones with `git pull origin master`, and then, you'll re-apply your changes with `git stash apply`.
    45  
    46  After that, you'll need to run `go build -o Patcher "./patcher"`
    47  
    48  Once you've done that, you just need to run `./Patcher` to apply the latest patches to the database, etc.
    49  
    50  
    51  # Updating Dependencies
    52  
    53  Dependencies are third party scripts and programs which Gosora relies on to function. The instructions here do not cover updating MySQL / MariaDB or Go.
    54  
    55  You can update them by running the `go get` command.
    56  
    57  You'll need to restart the server after you change a template or update Gosora, e.g. with `run.bat` or killing the process and running `./run-linux` or via `./pre-run-linux` followed by `service gosora restart`.