Merge pull request #42 from lancachenet/41_nofetch

Added NOFETCH option to prevent git reset
This commit is contained in:
James Kinsman 2019-06-22 16:49:48 +01:00 committed by GitHub
commit 1555640740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -159,6 +159,11 @@ If you're a games publisher and you'd like LAN parties, gaming centers and other
If you have any questions, please check [our FAQs](faq.md). If this doesn't answer your question, please raise an issue in GitHub.
## How to help out
To build just run `docker build --tag lancachenet/monolithic:testing .`. To test you can run `./run_tests.sh`
If you want to test a new build with a forked uklans repo/branch you can specify `-e CACHE_DOMAIN_REPO=""` and even `-e NOFETCH=true` if using a locally bind mounted git repo.
## Thanks
- Based on original configs from [ansible-lanparty](https://github.com/ti-mo/ansible-lanparty).

View file

@ -7,8 +7,11 @@ export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostCACHE_I
if [[ ! -d .git ]]; then
git clone ${CACHE_DOMAIN_REPO} .
fi
git fetch origin
git reset --hard origin/master
if [[ "${NOFETCH:-false}" != "true" ]]; then
git fetch origin
git reset --hard origin/master
fi
TEMP_PATH=$(mktemp -d)
OUTPUTFILE=${TEMP_PATH}/outfile.conf
echo "map \$http_host \$cacheidentifier {" >> $OUTPUTFILE