From adbab97ca196e272e5735ca453ccc3cb65d59cdf Mon Sep 17 00:00:00 2001 From: Alessio Date: Mon, 19 Aug 2024 16:39:22 -0700 Subject: [PATCH] Reset the CI pipeline step conditions (don't force everything to run every time anymore) --- .woodpecker/build.yml | 17 ++++++++--------- internal/webserver/server.go | 1 + pkg/persistence/dm_queries.go | 1 - 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 3ba40f1..4889878 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -21,16 +21,15 @@ pipeline: # - offline_twatter_passwd - offline_twatter_session_file environment: - - SESSION_FILE_PATH=/tmp/Offline_Twatter.session # Temp location, to be imported by the integration test - # when: # At least one - # - path: - # - pkg/scraper/** - # - cmd/** - # - branch: v*.*.* + - SESSION_FILE_PATH=/tmp/Offline_Twatter.session # Temp location, to be imported by the integration test + when: # At least one + - path: + - pkg/scraper/** + - cmd/** + - branch: v*.*.* commands: - cd cmd - mkdir -p $(dirname $SESSION_FILE_PATH) # Make the temp directory... - - ls /tmp - echo "$OFFLINE_TWATTER_SESSION_FILE" > $SESSION_FILE_PATH # ...and write the session file to temp location - ./tests.sh @@ -46,8 +45,8 @@ pipeline: version_bump_test: image: offline-twitter/go - # when: - # branch: v*.*.* + when: + branch: v*.*.* secrets: # - offline_twatter_passwd - offline_twatter_session_file diff --git a/internal/webserver/server.go b/internal/webserver/server.go index 345f650..09fe4c9 100644 --- a/internal/webserver/server.go +++ b/internal/webserver/server.go @@ -101,6 +101,7 @@ func (app *Application) ServeHTTP(w http.ResponseWriter, r *http.Request) { // Serve directly from the embedded files http.FileServer(http.FS(embedded_files)).ServeHTTP(w, r) } else { + // Serve from disk http.StripPrefix("/static", http.FileServer(http.Dir(get_filepath("static")))).ServeHTTP(w, r) } case "tweet": diff --git a/pkg/persistence/dm_queries.go b/pkg/persistence/dm_queries.go index 8c7dca9..f3e2c19 100644 --- a/pkg/persistence/dm_queries.go +++ b/pkg/persistence/dm_queries.go @@ -387,7 +387,6 @@ func (p Profile) fill_dm_contents(trove *TweetTrove) { panic(err) } for _, vid := range videos { - println("asdfasfasdf") msg := trove.Messages[vid.DMMessageID] msg.Videos = []Video{vid} trove.Messages[msg.ID] = msg