Skip to content

Commit

Permalink
Ignore config
Browse files Browse the repository at this point in the history
Ignore config.yml on install and update.
  • Loading branch information
tmiland committed Mar 13, 2019
1 parent 13f0b48 commit eb1b0fe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
║ Invidious Update.sh ║
║ Automatic update script for Invidio.us ║
║ Maintained by @tmiland ║
║ version: 1.3.1
║ version: 1.3.2
╚═══════════════════════════════════════════════════════════════════╝
```

Expand Down Expand Up @@ -198,7 +198,9 @@ What's done:
- external_port will be set to 443 if https_only = true, else < blank > (assuming use of reverse proxy with https.)
- Set default domain to invidio.us since option now is blank in config. (blank domain doesn't work on local instance)
- Created IRC Channel on Freenode.net/#InvidiousUpdater
- Changed in [1.3.1](https://github.com/tmiland/Invidious-Updater/releases/tag/v1.3.1)
- Changed in [1.3.1](https://github.com/tmiland/Invidious-Updater/releases/tag/v1.3.1)
- [X] Ignore config.yml on install and update.
- Changed in [1.3.2](https://github.com/tmiland/Invidious-Updater/releases/tag/v1.3.2)

### Possible options

Expand Down
11 changes: 10 additions & 1 deletion invidious_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#### Maintained by @tmiland ####
######################################################################

version='1.3.1' # Must stay on line 14 for updater to fetch the numbers
version='1.3.2' # Must stay on line 14 for updater to fetch the numbers

#------------------------------------------------------------------------------#
#
Expand Down Expand Up @@ -773,16 +773,23 @@ get_crystal () {
exit 1;
fi
}
ignore_config () {
#sed -i '$ a config/config.yml' ${REPO_DIR}/.git/info/exclude
#git rm --cached ${REPO_DIR}/config/config.yml
git update-index --skip-worktree ${REPO_DIR}/config/config.yml
}
##
# Checkout Master branch to branch master (to avoid detached HEAD state)
##
GetMaster () {
ignore_config
git checkout origin/${IN_BRANCH} -B ${IN_BRANCH}
}
##
# Update Master branch
##
UpdateMaster () {
ignore_config
currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
git pull
for i in `git rev-list --abbrev-commit $currentVersion..HEAD` ; do file=${REPO_DIR}/config/migrate-scripts/migrate-db-$i.sh ; [ -f $file ] && $file ; done
Expand All @@ -793,6 +800,7 @@ UpdateMaster () {
# Checkout Release tag to branch release (to avoid detached HEAD state)
##
GetRelease () {
ignore_config
git fetch --tags
latestVersion=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout tags/$latestVersion -B ${IN_RELEASE}
Expand All @@ -801,6 +809,7 @@ GetRelease () {
# Update Release
##
UpdateRelease () {
ignore_config
currentVersion=$(git rev-list --max-count=1 --abbrev-commit HEAD)
git pull
latestVersion=$(git describe --tags --abbrev=0)
Expand Down

0 comments on commit eb1b0fe

Please sign in to comment.