Restore Makefile with only publish target

Crossplane needs the publish target to commit changes back to this repo,
so we restore the Makefile with only that functionality.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
This commit is contained in:
hasheddan 2022-10-10 17:17:40 -04:00
parent c98ba28a53
commit 2ce30ba97c
No known key found for this signature in database
GPG Key ID: BD68BC686A14C271
1 changed files with 14 additions and 0 deletions

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
# Push new changes to the live site
publish:
$(eval ROOT_DIR = $(shell pwd -P))
git -C "$(ROOT_DIR)" add -A
@if git -C "$(ROOT_DIR)" diff-index --cached --quiet HEAD --; then\
echo "no changes detected";\
else \
echo "committing changes...";\
git -C "$(ROOT_DIR)" -c user.email="info@crossplane.io" -c user.name="Crossplane" commit --message="docs snapshot for crossplane version \`$(DOCS_VERSION)\`"; \
echo "pushing changes..."; \
git -C "$(ROOT_DIR)" push; \
echo "crossplane.github.io changes published"; \
fi