335:2b6b78ec4854
Anton Shestakov <av6@dwimlabs.net>, Tue, 30 Jan 2018 12:24:07 +0800
viewer: jQuery 3.3.1

previous change 334:a55b3e2f6f87

Makefile

Permissions: -rw-r--r--

Other formats: Feeds:
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
pip := ./venv/bin/pip install -r requirements.txt -r dev-requirements.txt
libs := static/libs
jquery_version := 3.3.1
jquery_sha256 := b8442ed017e5311995d7174afe7ee1d06485915def347644971efcc8338d37b4
uikit_version := 2.27.5
uikit_sha256 := 50d070e0551df41b9329ea5283714af759494445ce138147c283978922a620eb
moment_version := 2.20.1
moment_sha256 := 8675d811a20d4d8bb5b8c2de51fc244ce4110c009acd8fa514d951686bca2de0
d3_version := 4.13.0
d3_sha256 := 29288a2be82014ffa03f8ee1f8519bd43b71f09790409dcfa300ee3bb77fd81b
.PHONY: all
all: venv/bin/python libs
.PHONY: devel
devel: venv
$(pip)
venv:
virtualenv venv
venv/bin/python: | venv
$(pip)
.PHONY: tests
tests: venv/bin/python
./venv/bin/python ./run-tests.py -v \
--cov-report=term \
--cov=candolint \
--cov=incoming \
--cov=viewer \
--cov=checker \
--cov=hooks-queue
.PHONY: check
check: tests
.PHONY: libs
libs: \
$(libs)/jquery/$(jquery_version)/ \
$(libs)/uikit/$(uikit_version)/ \
$(libs)/moment/$(moment_version)/ \
$(libs)/d3/$(d3_version)/
.INTERMEDIATE: jquery-$(jquery_version).tar.gz
jquery-$(jquery_version).tar.gz:
wget -q https://github.com/jquery/jquery/archive/$(jquery_version).tar.gz -O $@
echo '$(jquery_sha256) $@' | sha256sum -c -
$(libs)/jquery/$(jquery_version)/: jquery-$(jquery_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=2 -C $@ --wildcards 'jquery-$(jquery_version)/dist/jquery*'
.INTERMEDIATE: uikit-$(uikit_version).tar.gz
uikit-$(uikit_version).tar.gz:
wget -q https://github.com/uikit/uikit/archive/$(uikit_version).tar.gz -O $@
echo '$(uikit_sha256) $@' | sha256sum -c -
$(libs)/uikit/$(uikit_version)/: uikit-$(uikit_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=1 -C $@ --wildcards \
'uikit-$(uikit_version)/css/*.min.css' \
'uikit-$(uikit_version)/js/' \
'uikit-$(uikit_version)/fonts/'
.INTERMEDIATE: moment-$(moment_version).tar.gz
moment-$(moment_version).tar.gz:
wget -q https://github.com/moment/moment/archive/$(moment_version).tar.gz -O $@
echo '$(moment_sha256) $@' | sha256sum -c -
$(libs)/moment/$(moment_version)/: moment-$(moment_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=2 -C $@ --exclude='tests.js' 'moment-$(moment_version)/min/'
.INTERMEDIATE: d3-release-$(d3_version).zip
d3-release-$(d3_version).zip:
wget -q https://github.com/d3/d3/releases/download/v$(d3_version)/d3.zip -O $@
echo '$(d3_sha256) $@' | sha256sum -c -
$(libs)/d3/$(d3_version)/: d3-release-$(d3_version).zip
mkdir -p $@
unzip -j $< '*.js' -d $@
.PHONY: clean
clean:
if test -d $(libs); then rm -r $(libs); fi