documentation/Updating.md

34 lines
1.2 KiB
Markdown
Raw Normal View History

2019-01-24 18:07:19 +00:00
## Invidious releases are based on tags. You can use them if you want to be sure your instance is stable.
#### With release tags
```bash
$ sudo -i -u invidious
$ cd invidious
2019-02-09 18:14:03 +00:00
$ currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
2019-01-24 18:07:19 +00:00
$ git pull
2019-03-05 00:56:30 +00:00
$ latestVersion=$(git describe --tags --abbrev=0)
2019-01-24 18:07:19 +00:00
$ git checkout $latestVersion
$ for i in `git rev-list --reverse --abbrev-commit $currentVersion..HEAD` ; do file=./config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done
2019-02-28 16:51:33 +00:00
$ shards update && shards install
2019-01-24 18:07:19 +00:00
$ crystal build src/invidious.cr --release
$ exit
$ sudo systemctl restart invidious.service
```
#### With master branch
```bash
$ sudo -i -u invidious
$ cd invidious
2019-02-09 18:14:03 +00:00
$ currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
2019-01-24 18:07:19 +00:00
$ git pull
$ for i in `git rev-list --reverse --abbrev-commit $currentVersion..HEAD` ; do file=./config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done
2019-02-28 16:51:33 +00:00
$ shards update && shards install
2019-01-24 18:07:19 +00:00
$ crystal build src/invidious.cr --release
$ exit
$ sudo systemctl restart invidious.service
2019-06-15 16:00:36 +00:00
```
#### With Docker:
```bash
$ docker-compose pull && docker-compose up --force-recreate --build && docker image prune -f
2019-01-24 18:07:19 +00:00
```