mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
a54577152b
Signed-off-by: Ian Maddaus <ian.maddaus@progress.com>
29 lines
1 KiB
Makefile
29 lines
1 KiB
Makefile
# 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
|
|
|
|
preview_netlify: chef_web_docs
|
|
cp -R content/* chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/content
|
|
cp -R static/* chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/static
|
|
cp -R config.toml chef-web-docs/_vendor/github.com/inspec/inspec/docs-chef-io/
|
|
pushd chef-web-docs && make bundle; hugo --gc --minify --buildFuture && popd
|
|
|
|
serve: chef_web_docs
|
|
echo "replace github.com/inspec/inspec/docs-chef-io => ../" >> chef-web-docs/go.mod
|
|
pushd chef-web-docs && make bundle; hugo server --buildDrafts --buildFuture --noHTTPCache && popd
|
|
|
|
chef_web_docs:
|
|
if [ -d "chef-web-docs/" ]; then \
|
|
pushd chef-web-docs && git reset HEAD --hard; git clean -fd; git pull --ff-only origin main; rm -rf public && popd; \
|
|
else \
|
|
git clone https://github.com/chef/chef-web-docs.git; \
|
|
fi
|
|
|
|
clean_all:
|
|
rm -rf chef-web-docs
|
|
|
|
clean:
|
|
pushd chef-web-docs && make clean_all && popd
|
|
|
|
lint:
|
|
hugo -D
|