2020-07-08 00:43:46 +00:00
|
|
|
# we use pushd/popd here, and /bin/sh of our chefes/buildkite image is not bash
|
|
|
|
# so we have to override the default shell here
|
|
|
|
SHELL=bash
|
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
preview_netlify: chef_web_docs
|
2020-09-14 20:53:40 +00:00
|
|
|
cp -R content/* chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/content
|
2020-12-11 02:02:52 +00:00
|
|
|
cp -R static/* chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/static
|
2021-02-10 20:25:35 +00:00
|
|
|
cp -R config.toml chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
|
2020-12-11 02:02:52 +00:00
|
|
|
pushd chef-web-docs && make assets; hugo --gc --minify --buildFuture && popd
|
2020-07-08 00:43:46 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
serve: chef_web_docs
|
|
|
|
echo "replace github.com/inspec/inspec/docs-chef-io => ../" >> chef-web-docs/go.mod
|
|
|
|
pushd chef-web-docs && make assets; hugo server --buildDrafts --buildFuture --noHTTPCache --ignoreVendorPaths "github.com/inspec/inspec/**" && popd
|
2020-07-08 00:43:46 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
chef_web_docs:
|
|
|
|
if [ -d "chef-web-docs/" ]; then \
|
2021-05-05 23:06:38 +00:00
|
|
|
pushd chef-web-docs && git reset HEAD --hard; git clean -fd; git pull --ff-only origin master; rm -rf public && popd; \
|
2020-12-11 02:02:52 +00:00
|
|
|
else \
|
|
|
|
git clone https://github.com/chef/chef-web-docs.git; \
|
|
|
|
fi
|
2020-09-14 20:53:40 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
clean_all:
|
2021-02-10 20:25:35 +00:00
|
|
|
rm -rf chef-web-docs
|
|
|
|
|
|
|
|
clean:
|
2020-12-11 02:02:52 +00:00
|
|
|
pushd chef-web-docs && make clean_all && popd
|
2020-07-08 00:43:46 +00:00
|
|
|
|
2020-12-11 02:02:52 +00:00
|
|
|
lint:
|
2020-07-08 00:43:46 +00:00
|
|
|
hugo -D
|