mirror of
https://github.com/Anon-Planet/thgtoa.git
synced 2025-04-19 07:25:54 -04:00
Move scripts to their own dir (aptly named script)
Move scripts to their own directory. Add `serve.sh` for serving locally (from internal build repo). Rename: - clean.sh -> script/clean.sh - make.sh -> script/make.sh Now you can type `make serve` to serve the guide locally. $ make <TAB> all clean guide serve Requirements are still included in the `serve.sh` file. Signed-off-by: Sharp-tailed Grouse <sharptail@riseup.net>
This commit is contained in:
parent
c095430067
commit
04f7307910
17
Makefile
17
Makefile
@ -1,4 +1,15 @@
|
||||
all: guide
|
||||
|
||||
guide: clean
|
||||
./make.sh
|
||||
clean:
|
||||
./clean.sh
|
||||
./script/make.sh
|
||||
|
||||
.phony: serve
|
||||
serve: # This gets all gems and installs bundler.
|
||||
# Serves the guide locally using Jekyll. 🍽️
|
||||
@echo "Serving site..."
|
||||
./script/serve.sh
|
||||
|
||||
clean: # Clean artifacts. 🧹
|
||||
@echo "Cleaning..."
|
||||
./script/clean.sh
|
||||
|
||||
|
0
clean.sh → script/clean.sh
Executable file → Normal file
0
clean.sh → script/clean.sh
Executable file → Normal file
0
make.sh → script/make.sh
Executable file → Normal file
0
make.sh → script/make.sh
Executable file → Normal file
37
script/serve.sh
Normal file
37
script/serve.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Prerequisites:
|
||||
# 1. git
|
||||
# 2. ruby
|
||||
# 3. ruby-dev
|
||||
#
|
||||
# Script MUST be in the root of the git clone directory of your choice.
|
||||
# You MUST execute it with elevated privileges.
|
||||
#
|
||||
# When done you can execute these commands:
|
||||
# $ bundle exec jekyll serve --livereload (will build and serve the project locally)
|
||||
# $ bundle exec jekyll build (will build the site in _site folder)
|
||||
|
||||
gem update # Errors are safely ignored.
|
||||
gem install bundler jekyll # Speaks for itself.
|
||||
rm -f Gemfile* # Out with the old..
|
||||
bundle init # ..and in with the new.
|
||||
rm -rf ./vendor/ # In case `bundle init` above does anything weird.
|
||||
|
||||
# Creating the Gemfile we want
|
||||
cat <<EOF >Gemfile
|
||||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
# gem "rails"
|
||||
|
||||
# gem "jekyll", "~> 4.2"
|
||||
gem "github-pages", group: :jekyll_plugins
|
||||
gem "jekyll-optional-front-matter", group: :jekyll_plugins
|
||||
gem "webrick", "~> 1.7"
|
||||
EOF
|
||||
bundle install # this will install gems and create a new Gemfile.lock
|
||||
|
||||
echo "Now you can test locally: "
|
||||
echo "$ bundle exec jekyll serve --livereload"
|
Loading…
x
Reference in New Issue
Block a user