mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
Replace the Swift site generator with a Ruby and Phlex implementation. Loads site and projects from TOML, derive site metadata from posts. Migrate from make to bake and add standardrb and code coverage tasks. Update CI and docs to match the new workflow, and remove unused assets/dependencies plus obsolete tooling.
37 lines
809 B
Bash
Executable file
37 lines
809 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
|
RUBY_VERSION="$(cat "$ROOT_DIR/.ruby-version")"
|
|
|
|
if [[ "$(uname)" = "Linux" ]]; then
|
|
echo "*** installing Linux prerequisites"
|
|
sudo apt install -y \
|
|
build-essential \
|
|
git \
|
|
inotify-tools \
|
|
libffi-dev \
|
|
libyaml-dev \
|
|
pkg-config \
|
|
zlib1g-dev
|
|
fi
|
|
|
|
cd "$ROOT_DIR"
|
|
|
|
if command -v rbenv >/dev/null 2>/dev/null; then
|
|
echo "*** using rbenv (ruby $RUBY_VERSION)"
|
|
rbenv install -s "$RUBY_VERSION"
|
|
if ! rbenv exec gem list -i bundler >/dev/null 2>/dev/null; then
|
|
rbenv exec gem install bundler
|
|
fi
|
|
rbenv exec bundle install
|
|
else
|
|
echo "*** rbenv not found, using system Ruby"
|
|
if ! gem list -i bundler >/dev/null 2>/dev/null; then
|
|
gem install bundler
|
|
fi
|
|
bundle install
|
|
fi
|
|
|
|
echo "*** done"
|