Start removing Makefile
This commit is contained in:
parent
ccb0627ae7
commit
40653e5c18
7 changed files with 17 additions and 82 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -60,7 +60,6 @@ target/
|
||||||
# Pelican stuff
|
# Pelican stuff
|
||||||
output/
|
output/
|
||||||
theme/static/build/
|
theme/static/build/
|
||||||
pelican_plugins/
|
|
||||||
|
|
||||||
theme/static/src/scss/pygment.css
|
theme/static/src/scss/pygment.css
|
||||||
deploy/
|
deploy/
|
||||||
|
|
7
.gitmodules
vendored
Normal file
7
.gitmodules
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[submodule "plugins/pelican-jinja2content"]
|
||||||
|
path = plugins/pelican-jinja2content
|
||||||
|
url = https://github.com/RealOrangeOne/pelican-jinja2content
|
||||||
|
|
||||||
|
[submodule "pelican_plugins"]
|
||||||
|
path = pelican_plugins
|
||||||
|
url = https://github.com/getpelican/pelican-plugins
|
64
Makefile
64
Makefile
|
@ -6,75 +6,15 @@ PELICAN=$(ENV)/pelican
|
||||||
OUTPUTDIR=$(BASEDIR)/output
|
OUTPUTDIR=$(BASEDIR)/output
|
||||||
PLUGINS_DIR=$(BASEDIR)/pelican_plugins
|
PLUGINS_DIR=$(BASEDIR)/pelican_plugins
|
||||||
DEPLOY_DIR=$(BASEDIR)/deploy
|
DEPLOY_DIR=$(BASEDIR)/deploy
|
||||||
CONFIG_FILE=$(BASEDIR)/config/pelicanconf.py
|
CONFIG_FILE=$(BASEDIR)/pelicanconf.py
|
||||||
|
|
||||||
FLAKE8_IGNORE=--ignore=E128,E501,E401,E402
|
|
||||||
|
|
||||||
build: install
|
build: install
|
||||||
rm -rf $(OUTPUTDIR)/*
|
rm -rf $(OUTPUTDIR)/*
|
||||||
@echo ">> Building static data..."
|
|
||||||
mkdir -p theme/static/build/js/lib theme/static/build/fonts theme/static/build/css theme/static/build/img
|
|
||||||
cp -R node_modules/font-awesome/fonts theme/static/build/
|
|
||||||
npm run build-js
|
|
||||||
npm run build-scss
|
|
||||||
@echo ">> Building pelican..."
|
@echo ">> Building pelican..."
|
||||||
$(PELICAN) -o $(OUTPUTDIR) -vs $(CONFIG_FILE)
|
$(PELICAN) -o $(OUTPUTDIR) -vs $(CONFIG_FILE)
|
||||||
mv $(OUTPUTDIR)/assets/robots.txt $(OUTPUTDIR)
|
mv $(OUTPUTDIR)/assets/robots.txt $(OUTPUTDIR)
|
||||||
cp -R $(OUTPUTDIR)/assets/* $(OUTPUTDIR)/static
|
cp -R $(OUTPUTDIR)/assets/* $(OUTPUTDIR)/static
|
||||||
rm -rf $(OUTPUTDIR)/assets
|
rm -rf $(OUTPUTDIR)/assets
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(OUTPUTDIR)/*
|
|
||||||
rm -rf $(BASEDIR)/env/
|
|
||||||
rm -rf $(BASEDIR)/node_modules/
|
|
||||||
rm -rf $(PLUGINS_DIR)/*
|
|
||||||
|
|
||||||
|
install: env node_modules
|
||||||
install: env node_modules pelican_plugins
|
|
||||||
|
|
||||||
pelican_plugins: env
|
|
||||||
rm -rf $(PLUGINS_DIR) || "No existing extensions"
|
|
||||||
git clone --recursive https://github.com/getpelican/pelican-plugins $(PLUGINS_DIR) || "Git Fail"
|
|
||||||
@echo ">> Hotfixing..."
|
|
||||||
rm -rf $(PLUGINS_DIR)/pelican-jinja2content
|
|
||||||
git clone https://github.com/RealOrangeOne/pelican-jinja2content -b patch-1 --depth=1 $(PLUGINS_DIR)/pelican-jinja2content
|
|
||||||
|
|
||||||
env:
|
|
||||||
pyvenv env
|
|
||||||
$(ENV)/pip install -r requirements.txt --upgrade
|
|
||||||
|
|
||||||
node_modules:
|
|
||||||
npm install
|
|
||||||
|
|
||||||
|
|
||||||
test: unittest lint spellcheck securitycheck
|
|
||||||
|
|
||||||
unittest:
|
|
||||||
$(ENV)/nose2 --verbose
|
|
||||||
|
|
||||||
lint:
|
|
||||||
$(NODE_BIN)/eslint 'theme/static/src/js/'
|
|
||||||
$(NODE_BIN)/sass-lint -vqc .sass-lint.yml
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/plugins/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/scripts/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/config/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/flake8 $(BASEDIR)/tests/ $(FLAKE8_IGNORE)
|
|
||||||
$(ENV)/yamllint config/config.yml
|
|
||||||
|
|
||||||
spellcheck:
|
|
||||||
$(NODE_BIN)/mdspell --en-gb -ranx theme/templates/**/*.* theme/templates/*.*
|
|
||||||
$(NODE_BIN)/mdspell --en-gb -ranx content/**/*.md content/*.md content/**/*.html content/*.html
|
|
||||||
|
|
||||||
securitycheck:
|
|
||||||
$(NODE_BIN)/nsp check
|
|
||||||
$(ENV)/bandit -r plugins/ config/ tests/
|
|
||||||
|
|
||||||
|
|
||||||
upload:
|
|
||||||
git clone https://github.com/RealOrangeOne/host-container.git $(DEPLOY_DIR)
|
|
||||||
cp -rf $(OUTPUTDIR)/. $(DEPLOY_DIR)/site/
|
|
||||||
@cd $(DEPLOY_DIR) && git remote add dokku $(DEPLOY_URL) && git add . && git commit -m "add files" && git push -f dokku master --quiet
|
|
||||||
rm -rf $(DEPLOY_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build clean test lint install upload
|
|
||||||
|
|
16
circle.yml
16
circle.yml
|
@ -7,19 +7,3 @@ machine:
|
||||||
BUILD_PRODUCTION: true
|
BUILD_PRODUCTION: true
|
||||||
NODE_ENV: production
|
NODE_ENV: production
|
||||||
NPM_CONFIG_PRODUCTION: false
|
NPM_CONFIG_PRODUCTION: false
|
||||||
|
|
||||||
dependencies:
|
|
||||||
pre:
|
|
||||||
- make -B
|
|
||||||
|
|
||||||
test:
|
|
||||||
override:
|
|
||||||
- make test
|
|
||||||
|
|
||||||
deployment:
|
|
||||||
production:
|
|
||||||
branch: master
|
|
||||||
commands:
|
|
||||||
- git config --global user.email "git@theorangeone.net"
|
|
||||||
- git config --global user.name "TheOrangeOne"
|
|
||||||
- make upload
|
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"description": " Source code for TheOrangeOne.net",
|
"description": " Source code for TheOrangeOne.net",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"postinstall": "npm run create-build-dirs && npm run copy-fonts && npm run build",
|
||||||
|
"create-build-dirs": "mkdir -p theme/static/build/js/lib theme/static/build/fonts theme/static/build/css theme/static/build/img",
|
||||||
|
"copy-fonts": "cp -R node_modules/font-awesome/fonts theme/static/build/",
|
||||||
|
"build": "npm run build-scss && npm run build-js",
|
||||||
"build-js": "./scripts/build-js.sh",
|
"build-js": "./scripts/build-js.sh",
|
||||||
"build-scss": "./scripts/build-scss.sh"
|
"build-scss": "./scripts/build-scss.sh"
|
||||||
},
|
},
|
||||||
|
|
1
pelican_plugins
Submodule
1
pelican_plugins
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 6cd5a608b45fdc21bb11ed1f72a151cdb71c1169
|
|
@ -10,11 +10,11 @@ from config import settings
|
||||||
AUTHOR = settings.author
|
AUTHOR = settings.author
|
||||||
SITENAME = settings.site_name
|
SITENAME = settings.site_name
|
||||||
SITEURL = settings.url
|
SITEURL = settings.url
|
||||||
PATH = '../content'
|
PATH = 'content'
|
||||||
TIMEZONE = settings.timezone
|
TIMEZONE = settings.timezone
|
||||||
DEFAULT_LANG = settings.language
|
DEFAULT_LANG = settings.language
|
||||||
PAGE_PATHS = ["pages"]
|
PAGE_PATHS = ["pages"]
|
||||||
THEME = "../theme"
|
THEME = "theme"
|
||||||
THEME_STATIC_DIR = "static"
|
THEME_STATIC_DIR = "static"
|
||||||
THEME_STATIC_PATHS = ["static/build"]
|
THEME_STATIC_PATHS = ["static/build"]
|
||||||
STATIC_PATHS = ["assets"]
|
STATIC_PATHS = ["assets"]
|
||||||
|
@ -61,7 +61,7 @@ FEED_ATOM = 'feed.atom'
|
||||||
FEED_DOMAIN = SITEURL
|
FEED_DOMAIN = SITEURL
|
||||||
|
|
||||||
# Setup plugins
|
# Setup plugins
|
||||||
PLUGIN_PATHS = ["../pelican_plugins", "../plugins"]
|
PLUGIN_PATHS = ["plugins", "pelican_plugins"]
|
||||||
PLUGINS = settings.pelican_plugins
|
PLUGINS = settings.pelican_plugins
|
||||||
|
|
||||||
if BUILD_PRODUCTION:
|
if BUILD_PRODUCTION:
|
Reference in a new issue