- Completed linux release installation and update. Slightly reformatted

- Renamed linux and windows output folders in .gitlab-ci.yml
This commit is contained in:
Kwoth
2021-08-25 01:05:23 +02:00
parent 2cb7243b10
commit b0f6895449
2 changed files with 63 additions and 17 deletions

View File

@@ -9,9 +9,9 @@ stages:
variables: variables:
project: "NadekoBot" project: "NadekoBot"
tests: "NadekoBot.Tests" tests: "NadekoBot.Tests"
LINUX_X64_OUTPUT_DIR: "output-linux-x64" LINUX_X64_OUTPUT_DIR: "nadekobot-linux-x64"
LINUX_X64_RELEASE: "$CI_COMMIT_TAG-linux-x64-build.tar" LINUX_X64_RELEASE: "$CI_COMMIT_TAG-linux-x64-build.tar"
WIN_X64_OUTPUT_DIR: "output-windows-x64" WIN_X64_OUTPUT_DIR: "nadekobot-windows-x64"
WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip" WIN_X64_RELEASE: "$CI_COMMIT_TAG-windows-x64-build.zip"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/NadekoBot-build/${CI_COMMIT_TAG}" PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/NadekoBot-build/${CI_COMMIT_TAG}"

View File

@@ -63,14 +63,14 @@
### Windows From Source ### Windows From Source
###### Prerequisites ##### Prerequisites
Install these before proceeding *Install these before proceeding*
- [.net 5](https://dotnet.microsoft.com/download/dotnet/5.0) - needed to compile and run the bot - [.net 5](https://dotnet.microsoft.com/download/dotnet/5.0) - needed to compile and run the bot
- [git](https://git-scm.com/downloads) - needed to clone the repository (you can also download the zip manually and extract it but this guide assumes you're using git) - [git](https://git-scm.com/downloads) - needed to clone the repository (you can also download the zip manually and extract it but this guide assumes you're using git)
- [redis](https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi) - to cache things needed by some features and persist through restarts - [redis](https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.msi) - to cache things needed by some features and persist through restarts
###### Installation Instructions ##### Installation Instructions
Open PowerShell (press windows button on your keyboard and type powershell, it should show up), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`) Open PowerShell (press windows button on your keyboard and type powershell, it should show up), and navigate to the location where you want to install the bot (for example `cd ~/Desktop/`)
@@ -82,7 +82,7 @@ Open PowerShell (press windows button on your keyboard and type powershell, it s
7. Run the bot `dotnet NadekoBot.dll` 7. Run the bot `dotnet NadekoBot.dll`
8. 🎉 8. 🎉
###### Update Instructions (todo: WIP) ##### Update Instructions (todo: WIP)
Open powershell and run following commands: Open powershell and run following commands:
@@ -105,7 +105,7 @@ In order to use music commands, you need ffmpeg and youtube-dl installed.
Open Terminal (if you're on a linux with window manager) and navigate to the location where you want to install the bot (for example `cd ~`) Open Terminal (if you're on a linux with window manager) and navigate to the location where you want to install the bot (for example `cd ~`)
###### Installation Instructions ##### Installation Instructions
1. Download and run the **new** installer script `cd ~ && wget -N https://gitlab.com/Kwoth/nadeko-bash-installer/-/raw/master/linuxAIO.sh && bash linuxAIO.sh` 1. Download and run the **new** installer script `cd ~ && wget -N https://gitlab.com/Kwoth/nadeko-bash-installer/-/raw/master/linuxAIO.sh && bash linuxAIO.sh`
2. Install prerequisites (type `1` and press enter) 2. Install prerequisites (type `1` and press enter)
@@ -115,13 +115,13 @@ Open Terminal (if you're on a linux with window manager) and navigate to the loc
6. Open `nadekobot/output/creds.yml` with your favorite text editor. We will use nano here 6. Open `nadekobot/output/creds.yml` with your favorite text editor. We will use nano here
7. `nano nadekobot/output/creds.yml` 7. `nano nadekobot/output/creds.yml`
8. [Enter your bot's token](#creds-guide) 8. [Enter your bot's token](#creds-guide)
- You can close nano (and save the file) by typing - After you're done, you can close nano (and save the file) by typing
- CTRL+X - CTRL+X
- Type `y` - Type `y`
- Press Enter - Press Enter
9. Run the bot (type `3` and press enter) 9. Run the bot (type `3` and press enter)
###### Update Instructions ##### Update Instructions
1. ⚠ Stop the bot 1. ⚠ Stop the bot
2. Download and run the **new** installer script `cd ~ && wget -N https://gitlab.com/Kwoth/nadeko-bash-installer/-/raw/master/linuxAIO.sh && bash linuxAIO.sh` 2. Download and run the **new** installer script `cd ~ && wget -N https://gitlab.com/Kwoth/nadeko-bash-installer/-/raw/master/linuxAIO.sh && bash linuxAIO.sh`
@@ -131,22 +131,68 @@ Open Terminal (if you're on a linux with window manager) and navigate to the loc
### Linux Release ### Linux Release
##### Installation Instructions
1. Download the latest release from <https://gitlab.com/Kwoth/nadekobot/-/releases> 1. Download the latest release from <https://gitlab.com/Kwoth/nadekobot/-/releases>
- Look for the file called "X.XX.X-linux-x64-build.tar" and download it - Look for the file called "X.XX.X-linux-x64-build.tar" and download it
2. Untar it `tar xf 2.99.8-linux-x64-build.tar` 2. Untar it
- Rename the `output-linux-x64` to `nadekobot` (`mv output-linux-x64 nadekobot`) - `tar xf 2.99.8-linux-x64-build.tar`
3. Move into nadekobot directory and make NadekoBot executable `cd nadekobot && chmod +x NadekoBot` 3. Rename the `nadekobot-linux-x64` to `nadekobot`
5. Copy the creds.yml template `cp creds_example.yml creds.yml` - `mv nadekobot-linux-x64 nadekobot`
4. Move into nadekobot directory and make NadekoBot executable
- `cd nadekobot && chmod +x NadekoBot`
5. Copy the creds.yml template
- `cp creds_example.yml creds.yml`
6. Open `creds.yml` with your favorite text editor. We will use nano here 6. Open `creds.yml` with your favorite text editor. We will use nano here
7. `nano nadekobot/output/creds.yml` - `nano nadekobot/output/creds.yml`
8. [Enter your bot's token](#creds-guide) 8. [Enter your bot's token](#creds-guide)
- You can close nano (and save the file) by typing - After you're done, you can close nano (and save the file) by typing
- CTRL+X - CTRL+X
- Type `y` - Type `y`
- Press Enter - Press `Enter`
9. Run the bot `./NadekoBot` 9. Run the bot `./NadekoBot`
TODO: Updating release linux version ##### Update Instructions
1. Stop the bot
2. Download the latest release from <https://gitlab.com/Kwoth/nadekobot/-/releases>
- Look for the file called "X.XX.X-linux-x64-build.tar" and download it
3. Untar it
- `tar xf 2.99.8-linux-x64-build.tar`
4. Rename the old nadekobot directory to nadekobot-old (first remove old backup if you had one, or back it up under a different name)
- `rm -rf nadekobot-old 2>/dev/null`
- `mv nadekobot nadekobot-old`
5. Rename the new nadekobot directory to nadekobot
- `mv nadekobot-linux-x64 nadekobot`
6. Remove old strings and aliases to avoid overwriting updated version of those files
⚠ If you've modified these files, back them up instead
- `rm nadekobot-old/data/aliases.yml`
- `rm -r nadekobot-old/data/strings`
7. Copy old data
- `cp -RT nadekobot-old/data/ nadekobot/data/`
8. Copy creds.yml
- `cp nadekobot-old/creds.yml nadekobot/`
9. Move into nadekobot directory and make NadekoBot executable
- `cd nadekobot && chmod +x NadekoBot`
10. Run the bot
- `./NadekoBot`
🎉 Enjoy
##### Steps 2 - 9 as a single command
```sh
tar xf 2.99.8-linux-x64-build.tar && \
rm -rf nadekobot-old 2>/dev/null && \
mv nadekobot nadekobot-old && \
mv nadekobot-linux-x64 nadekobot && \
rm nadekobot-old/data/aliases.yml && \
rm -r nadekobot-old/data/strings && \
cp -RT nadekobot-old/data/ nadekobot/data/ && \
cp nadekobot-old/creds.yml nadekobot/ && \
cd nadekobot && chmod +x NadekoBot
```
## Creds Guide ## Creds Guide