Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"Bash(earthly +earthly-linux-amd64:*)",
"Bash(cat:*)",
"Bash(ls:*)",
"Bash(git rev-parse:*)"
"Bash(git rev-parse:*)",
"WebFetch(domain:earthly.dev)"
]
}
}
40 changes: 40 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy Marketing Site

on:
push:
branches: [marketing-site] # TODO: change back to main before merge
paths:
- 'www/**'
- '.github/workflows/deploy-site.yml'

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: ./www

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
1 change: 1 addition & 0 deletions www/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www.earthbuild.dev
54 changes: 54 additions & 0 deletions www/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EarthBuild - Build Anything, Anywhere</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
</head>
<body>
<header>
<h1>EarthBuild</h1>
<nav>
<a href="/install.html">Install</a>
<a href="https://docs.earthbuild.dev">Docs</a>
<a href="https://github.com/EarthBuild/earthbuild">GitHub</a>
</nav>
</header>

<main>
<section>
<h2>Build Anything, Anywhere</h2>
<p>EarthBuild is a simple, fast, and consistent build system for containerized, reproducible builds.</p>
<p>
<a href="/install.html"><strong>Get Started</strong></a> ·
<a href="https://docs.earthbuild.dev">Read the Docs</a>
</p>
</section>

<section>
<aside>
<strong>Community Fork</strong><br>
EarthBuild is the community-maintained fork of <a href="https://earthly.dev">Earthly</a>, continuing development after Earthly Technologies <a href="https://earthly.dev/blog/shutting-down-earthfiles-cloud/">ended active development</a> in 2025. We're committed to keeping this build tool alive and evolving.
</aside>
</section>

<section>
<h2>Why EarthBuild?</h2>

<h3>Reproducible Builds</h3>
<p>Run the same build on your laptop and in CI. Containerized execution ensures consistency across environments.</p>

<h3>Familiar Syntax</h3>
<p>If you know Dockerfiles and Makefiles, you already know EarthBuild. Get productive in minutes.</p>

<h3>Fast Iteration</h3>
<p>Smart caching and parallel execution make your builds fast. Change one file, rebuild only what's needed.</p>
</section>
</main>

<footer>
<p>EarthBuild is open source. <a href="https://github.com/EarthBuild/earthbuild">Contribute on GitHub</a></p>
</footer>
</body>
</html>
92 changes: 92 additions & 0 deletions www/install.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Install EarthBuild</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
</head>
<body>
<header>
<h1><a href="/">EarthBuild</a></h1>
<nav>
<a href="/install.html">Install</a>
<a href="https://docs.earthbuild.dev">Docs</a>
<a href="https://github.com/EarthBuild/earthbuild">GitHub</a>
</nav>
</header>

<main>
<h2>Install EarthBuild</h2>
<p>Get EarthBuild running on your machine in under a minute.</p>

<h3>Prerequisites</h3>
<p>EarthBuild requires Docker to be installed and running:</p>
<ul>
<li><strong>macOS:</strong> <a href="https://docs.docker.com/desktop/mac/install/">Docker Desktop for Mac</a></li>
<li><strong>Linux:</strong> <a href="https://docs.docker.com/engine/install/">Docker Engine</a></li>
<li><strong>Windows:</strong> <a href="https://docs.docker.com/desktop/windows/install/">Docker Desktop for Windows</a> with WSL 2</li>
</ul>

<h3>macOS</h3>
<p>Install with Homebrew:</p>
<pre><code>brew tap earthbuild/earthbuild
brew install earth</code></pre>

<p>Or download directly:</p>
<pre><code>curl -fsSL https://www.earthbuild.dev/install.sh | sh</code></pre>

<h3>Linux</h3>
<p>Install with our script:</p>
<pre><code>curl -fsSL https://www.earthbuild.dev/install.sh | sh</code></pre>

<p>Or install manually:</p>
<pre><code># Download the latest release
curl -LO https://github.com/EarthBuild/earthbuild/releases/latest/download/earth-linux-amd64

# Make it executable
chmod +x earth-linux-amd64

# Move to your PATH
sudo mv earth-linux-amd64 /usr/local/bin/earth</code></pre>
Comment on lines +44 to +51

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The manual installation instructions for Linux are hardcoded for the amd64 architecture. This can be confusing for users on other architectures like arm64, which the installer script supports. The commands can be improved by using a variable for the architecture, making it easier for users to adapt for their system. For example:

# Set your architecture (e.g., amd64, arm64)
ARCH=amd64

# Download the latest release for your architecture
curl -LO "https://github.com/EarthBuild/earthbuild/releases/latest/download/earth-linux-${ARCH}"

# Make it executable
chmod +x "earth-linux-${ARCH}"

# Move to your PATH
sudo mv "earth-linux-${ARCH}" /usr/local/bin/earth


<h3>Windows (WSL 2)</h3>
<p>Inside your WSL 2 environment:</p>
<pre><code>curl -fsSL https://www.earthbuild.dev/install.sh | sh</code></pre>

<blockquote>
<strong>Note:</strong> Native Windows support is experimental. We recommend using WSL 2.
</blockquote>

<h3>Nix / NixOS</h3>
<p>EarthBuild is available in nixpkgs:</p>
<pre><code>nix-shell -p earthbuild</code></pre>

<p>Or add to your NixOS configuration:</p>
<pre><code>environment.systemPackages = [ pkgs.earthbuild ];</code></pre>

<p>For nix-darwin:</p>
<pre><code>environment.systemPackages = [ pkgs.earthbuild ];</code></pre>

<p>For home-manager:</p>
<pre><code>home.packages = [ pkgs.earthbuild ];</code></pre>

<h3>Verify Installation</h3>
<pre><code>earth --version</code></pre>

<p>Bootstrap EarthBuild (first-time setup):</p>
<pre><code>earth bootstrap</code></pre>

<h3>Next Steps</h3>
<ul>
<li><a href="https://docs.earthbuild.dev/getting-started">Getting Started Guide</a></li>
<li><a href="https://docs.earthbuild.dev/earthfile">Earthfile Reference</a></li>
<li><a href="https://docs.earthbuild.dev/examples">Example Projects</a></li>
</ul>
</main>

<footer>
<p>EarthBuild is open source. <a href="https://github.com/EarthBuild/earthbuild">Contribute on GitHub</a></p>
</footer>
</body>
</html>
168 changes: 168 additions & 0 deletions www/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
#!/bin/sh
set -e

# EarthBuild installer script
# Usage: curl -fsSL https://www.earthbuild.dev/install.sh | sh

GITHUB_REPO="EarthBuild/earthbuild"
INSTALL_DIR="/usr/local/bin"
BINARY_NAME="earth"

log() {
echo "[earth] $1"
}

error() {
echo "[earth] ERROR: $1" >&2
exit 1
}

detect_os() {
log "Detecting operating system..."
OS="$(uname -s)"
case "$OS" in
Linux*)
OS="linux"
;;
Darwin*)
OS="darwin"
;;
MINGW*|MSYS*|CYGWIN*)
error "Native Windows is not supported. Please use WSL 2."
;;
*)
error "Unsupported operating system: $OS"
;;
esac
log "Detected OS: $OS"
}

detect_arch() {
log "Detecting architecture..."
ARCH="$(uname -m)"
case "$ARCH" in
x86_64|amd64)
ARCH="amd64"
;;
aarch64|arm64)
ARCH="arm64"
;;
*)
error "Unsupported architecture: $ARCH"
;;
esac
log "Detected architecture: $ARCH"
}

check_dependencies() {
log "Checking dependencies..."

if ! command -v curl >/dev/null 2>&1 && ! command -v wget >/dev/null 2>&1; then
error "Either curl or wget is required to download EarthBuild."
fi

log "Dependencies OK"
}

download_file() {
URL="$1"
OUTPUT="$2"

if command -v curl >/dev/null 2>&1; then
curl -fsSL "$URL" -o "$OUTPUT"
elif command -v wget >/dev/null 2>&1; then
wget -q "$URL" -O "$OUTPUT"
fi
}

get_latest_version() {
log "Fetching latest version..."

LATEST_URL="https://github.com/$GITHUB_REPO/releases/latest"

if command -v curl >/dev/null 2>&1; then
VERSION=$(curl -fsSI -o /dev/null -w '%{url_effective}' "$LATEST_URL" | sed 's|.*/||')
elif command -v wget >/dev/null 2>&1; then
VERSION=$(wget --spider --max-redirect=0 "$LATEST_URL" 2>&1 | grep -o 'releases/tag/[^"]*' | head -1 | sed 's|releases/tag/||')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The grep pattern to extract the version tag for wget users is incorrect. It uses [^"*], which can cause it to match more than just the version tag (e.g., v0.8.5 [following]). This results in an invalid version string. Using [^ ]* instead will correctly stop matching at the first space, ensuring only the tag is captured.

Suggested change
VERSION=$(wget --spider --max-redirect=0 "$LATEST_URL" 2>&1 | grep -o 'releases/tag/[^"]*' | head -1 | sed 's|releases/tag/||')
VERSION=$(wget --spider --max-redirect=0 "$LATEST_URL" 2>&1 | grep -o 'releases/tag/[^ ]*' | head -1 | sed 's|releases/tag/||')

fi

if [ -z "$VERSION" ]; then
error "Failed to determine latest version. Check your internet connection."
fi

log "Latest version: $VERSION"
}

download_binary() {
BINARY_FILENAME="${BINARY_NAME}-${OS}-${ARCH}"
DOWNLOAD_URL="https://github.com/$GITHUB_REPO/releases/download/$VERSION/$BINARY_FILENAME"

log "Downloading from: $DOWNLOAD_URL"

TMP_DIR=$(mktemp -d)
TMP_FILE="$TMP_DIR/$BINARY_NAME"

if ! download_file "$DOWNLOAD_URL" "$TMP_FILE"; then
rm -rf "$TMP_DIR"
error "Failed to download binary. The release asset may not exist for your platform ($OS/$ARCH)."
fi

log "Download complete"
}

install_binary() {
log "Installing to $INSTALL_DIR/$BINARY_NAME..."

chmod +x "$TMP_FILE"

if [ -w "$INSTALL_DIR" ]; then
mv "$TMP_FILE" "$INSTALL_DIR/$BINARY_NAME"
else
log "Requesting sudo access to install to $INSTALL_DIR..."
sudo mv "$TMP_FILE" "$INSTALL_DIR/$BINARY_NAME"
fi

rm -rf "$TMP_DIR"

log "Installation complete"
}

verify_installation() {
log "Verifying installation..."

if ! command -v "$BINARY_NAME" >/dev/null 2>&1; then
error "Installation failed. $BINARY_NAME not found in PATH."
fi

INSTALLED_VERSION=$("$BINARY_NAME" --version 2>/dev/null || echo "unknown")
log "Installed: $INSTALLED_VERSION"
}

main() {
echo ""
echo "=========================================="
echo " EarthBuild Installer"
echo "=========================================="
echo ""

detect_os
detect_arch
check_dependencies
get_latest_version
download_binary
install_binary
verify_installation

echo ""
echo "=========================================="
echo " Installation successful!"
echo "=========================================="
echo ""
echo "Next steps:"
echo ""
echo " 1. Run 'earth bootstrap' to complete setup"
echo " 2. Visit https://docs.earthbuild.dev/getting-started"
echo ""
}

main
Loading