From 2b3ccdf320fa4fc2343f00e8a01238da3cb494e7 Mon Sep 17 00:00:00 2001 From: Scan Date: Fri, 10 Apr 2026 01:10:50 -0400 Subject: [PATCH] Fix wrangler config --- build.sh | 89 --------------------------------------------------- wrangler.toml | 9 ------ 2 files changed, 98 deletions(-) delete mode 100644 build.sh delete mode 100644 wrangler.toml diff --git a/build.sh b/build.sh deleted file mode 100644 index d92590e..0000000 --- a/build.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env bash - -#------------------------------------------------------------------------------ -# @file -# Builds a Hugo site hosted on a Cloudflare Worker. -# -# The Cloudflare Worker automatically installs Node.js dependencies. -#------------------------------------------------------------------------------ - -# Exit on error, undefined variables, or pipe failures -set -euo pipefail - -build_temp_dir="" - -# Perform cleanup -cleanup() { - if [[ -n "${build_temp_dir:-}" && -d "${build_temp_dir}" ]]; then - rm -rf "${build_temp_dir}" - fi -} - -# Register the cleanup trap -trap cleanup EXIT SIGINT SIGTERM - -main() { - # Define tool versions - DART_SASS_VERSION=1.99.0 - GO_VERSION=1.26.1 - HUGO_VERSION=0.160.0 - NODE_VERSION=24.14.1 - - # Set the build timezone - export TZ=Europe/Oslo - - # Create and move into a temporary directory for downloads - build_temp_dir=$(mktemp -d) - pushd "${build_temp_dir}" > /dev/null - - # Create the local tools directory - mkdir -p "${HOME}/.local" - - # Install Dart Sass - echo "Installing Dart Sass ${DART_SASS_VERSION}..." - curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" - tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" - export PATH="${HOME}/.local/dart-sass:${PATH}" - - # Install Go - echo "Installing Go ${GO_VERSION}..." - curl -sLJO "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" - tar -C "${HOME}/.local" -xf "go${GO_VERSION}.linux-amd64.tar.gz" - export PATH="${HOME}/.local/go/bin:${PATH}" - - # Install Hugo - echo "Installing Hugo ${HUGO_VERSION}..." - curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.tar.gz" - mkdir -p "${HOME}/.local/hugo" - tar -C "${HOME}/.local/hugo" -xf "hugo_${HUGO_VERSION}_linux-amd64.tar.gz" - export PATH="${HOME}/.local/hugo:${PATH}" - - # Install Node.js - echo "Installing Node.js ${NODE_VERSION}..." - curl -sLJO "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" - tar -C "${HOME}/.local" -xf "node-v${NODE_VERSION}-linux-x64.tar.xz" - export PATH="${HOME}/.local/node-v${NODE_VERSION}-linux-x64/bin:${PATH}" - - # Return to the project root - popd > /dev/null - - # Verify installations - echo "Verifying installations..." - echo Dart Sass: "$(sass --version)" - echo Go: "$(go version)" - echo Hugo: "$(hugo version)" - echo Node.js: "$(node --version)" - - # Configure Git - echo "Configuring Git..." - git config core.quotepath false - if [ "$(git rev-parse --is-shallow-repository)" = "true" ]; then - git fetch --unshallow - fi - - # Build the site - echo "Building the site..." - hugo build --gc --minify -} - -main "$@" \ No newline at end of file diff --git a/wrangler.toml b/wrangler.toml deleted file mode 100644 index f2d951a..0000000 --- a/wrangler.toml +++ /dev/null @@ -1,9 +0,0 @@ -name = 'hardclear' -compatibility_date = '2025-07-31' - -[build] -command = 'chmod a+x build.sh && ./build.sh' - -[assets] -directory = './public' -not_found_handling = '404-page' \ No newline at end of file