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
2022-03-11 20:47:44 +00:00
rm -rf chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/*
cp -R content chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
cp -R static chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
cp -R layouts chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
2021-02-10 20:25:35 +00:00
cp -R config.toml chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
2024-03-28 06:42:26 +00:00
pushd chef-web-docs && bash ./scripts/netlify-deploy-preview.sh && popd
2020-07-08 00:43:46 +00:00
2020-12-11 02:02:52 +00:00
serve : chef_web_docs
2024-03-28 06:42:26 +00:00
printf "go 1.22\n\nuse .\nuse ../" > chef-web-docs/hugo.work
pushd chef-web-docs && make bundle && HUGO_MODULE_WORKSPACE = hugo.work hugo server --buildDrafts --buildFuture --noHTTPCache --ignoreVendorPaths "github.com/inspec/inspec/docs-chef-io" && 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-09-10 16:52:22 +00:00
pushd chef-web-docs && git reset HEAD --hard; git clean -fd; git pull --ff-only origin main; 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