mirror of
https://seed.radicle.dev/rad:z371PVmDHdjJucejRoRYJcDEvD5pp.git
synced 2026-10-18 19:10:34 +08:00
45 lines
1.0 KiB
Makefile
45 lines
1.0 KiB
Makefile
FILES := https://files.radicle.dev
|
|
NOW := $(shell date --iso-8601=seconds)
|
|
PUBLISH := ./publish/$(NOW)
|
|
GIT_STATUS := git status --porcelain
|
|
|
|
default: build
|
|
|
|
build: releases
|
|
bundle exec jekyll build $(CONFIG)
|
|
|
|
serve: releases
|
|
bundle exec jekyll serve $(CONFIG) --port 3000 --livereload
|
|
|
|
# NOTE: Manually keep these consistent with `_config.yml`.
|
|
releases:
|
|
curl -s -o _data/releases/radicle.json $(FILES)/releases/latest/radicle.json
|
|
curl -s -o _data/releases/radicle-httpd.json $(FILES)/releases/radicle-httpd/latest/radicle-httpd.json
|
|
|
|
dependencies:
|
|
gem install jekyll
|
|
|
|
cloudflare:
|
|
sudo gem install bundler
|
|
bundle config path vendor/bundle
|
|
bundle install
|
|
bundle exec jekyll build $(CONFIG)
|
|
|
|
svgs:
|
|
scripts/cleanup-svgs.sh assets/images/*.svg
|
|
|
|
publish: releases
|
|
@if [ ! -z "$$($(GIT_STATUS))" ]; \
|
|
then \
|
|
$(GIT_STATUS) ; \
|
|
exit 1 ; \
|
|
else \
|
|
bundle exec jekyll build --destination=$(PUBLISH) ; \
|
|
wrangler deploy --name="website" --assets=$(PUBLISH) ; \
|
|
fi
|
|
|
|
clean:
|
|
@rm -rfv _site
|
|
|
|
.PHONY: default publish clean
|