From 9a7dac435da2f746ba6fb7aee3861af4c1e8a7ae Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 13 Mar 2020 03:01:43 -0600 Subject: [PATCH] go back to what worked --- .travis.yml | 6 ++++++ daily.sh | 5 +---- src/conf.lua | 6 ------ src/main.lua | 1 + 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index f5772cd..8e5e0b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,9 @@ addons: update: true packages: - libzip-dev + - xvfb +services: + - xvfb before_install: - | pip install hererocks @@ -13,6 +16,9 @@ before_install: export 'PATH='"$TRAVIS_BUILD_DIR"'/env/bin'":$PATH" install: - | + sudo add-apt-repository -y ppa:bartbes/love-stable + sudo apt-get -q update + sudo apt-get -y install love luarocks install --server="http://luarocks.org/dev" lua-zip luarocks install love-release script: diff --git a/daily.sh b/daily.sh index 32c65fc..fed3fb6 100644 --- a/daily.sh +++ b/daily.sh @@ -1,12 +1,9 @@ set -ev if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then exit 0; fi -sudo add-apt-repository -y ppa:bartbes/love-stable -sudo apt-get -q update -sudo apt-get -y install love cd src love-release -love "releases/CaveStoryRandomizer.love" --daily --headless +sudo xvfb-run --server-args="-screen 0 1024x768x24" love "releases/CaveStoryRandomizer.love" --daily cat daily.txt curl -H "Content-Type: application/json" -X POST -d @daily.txt "$WEBHOOK" \ No newline at end of file diff --git a/src/conf.lua b/src/conf.lua index 5930d0e..fbdf234 100644 --- a/src/conf.lua +++ b/src/conf.lua @@ -24,12 +24,6 @@ function love.conf(t) t.modules.touch = false t.modules.video = false - for _,a in pairs(arg) do - if a == "--headless" then - t.window, t.modules.window, t.modules.graphics = false, false, false - end - end - t.releases = { -- This is the name of the zip archive which contains your game. title = 'CaveStoryRandomizer', diff --git a/src/main.lua b/src/main.lua index 72f1bd4..1ef7099 100644 --- a/src/main.lua +++ b/src/main.lua @@ -27,6 +27,7 @@ function love.load(args) Settings:init() if _.contains(args, "--daily") then + love.window.close() U.writeFile("daily.txt", generateDaily()) love.event.quit() return