Commit 0a719dd8 authored by Tom's avatar Tom

fix: record sqlite3 version even on failure to keep python cache

If SQLite3 apt install fails, still write python-sqlite3-version so
steps/python doesn't clear the python cache and re-download the runtime
on every build. Avoids repeated full re-downloads + builds.
parent ef3d4bd8
...@@ -82,12 +82,15 @@ buildpack_sqlite3_install() { ...@@ -82,12 +82,15 @@ buildpack_sqlite3_install() {
if [ "$INSTALLED_SQLITE3_VERSION" != "$SQLITE3_VERSION" ]; then if [ "$INSTALLED_SQLITE3_VERSION" != "$SQLITE3_VERSION" ]; then
puts-step "Installing SQLite3" puts-step "Installing SQLite3"
if sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION"; then if sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION"; then
# save version installed puts-step "SQLite3 installed"
mkdir -p "$CACHE_DIR/.heroku/"
echo "$SQLITE3_VERSION" > "$CACHE_DIR/.heroku/python-sqlite3-version"
else else
puts-warn "SQLite3 install failed (EOL apt repos?), continuing without it" puts-warn "SQLite3 install failed (EOL apt repos?), continuing without it"
fi fi
# Record the version even on failure so the python cache isn't cleared
# and the runtime isn't re-downloaded on every subsequent build.
mkdir -p "$CACHE_DIR/.heroku/"
echo "$SQLITE3_VERSION" > "$CACHE_DIR/.heroku/python-sqlite3-version"
fi fi
fi fi
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment