Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
456 changes: 32 additions & 424 deletions .gitignore

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
33 changes: 25 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
SHELL := /bin/bash

.PHONY : help init test lint nag release clean
.PHONY : help init test lint nag release clean sync
.DEFAULT: help

VENV_NAME ?= venv
VENV_NAME ?= .venv
PYTHON ?= $(VENV_NAME)/bin/python
PUBLIC_REPO ?= ../cfn-workshop-github

help:
@echo "help get the full command list"
@echo "init create VirtualEnv and install libraries"
@echo "init create VirtualEnv with uv and install libraries"
@echo "test run pre-commit checks"
@echo "lint GitHub actions cfn-lint test"
@echo "nag GitHub actions cfn-nag test"
@echo "sync sync files to public GitHub repo (excludes content/, static/, contentspec.yaml, docs/)"
@echo "version [part=major||minor||patch] bump version and tag release (make version part=patch)"
@echo "release push new tag to release branch"
@echo "clean delete VirtualEnv and installed libraries"
Expand All @@ -21,14 +23,13 @@ init: $(VENV_NAME) pre-commit

$(VENV_NAME): $(VENV_NAME)/bin/activate

$(VENV_NAME)/bin/activate: requirements.txt
test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME)
$(PYTHON) -m pip install -U pip
$(PYTHON) -m pip install -Ur requirements.txt
$(VENV_NAME)/bin/activate: pyproject.toml .python-version
uv venv --python-preference only-managed
uv pip install -r pyproject.toml
touch $(VENV_NAME)/bin/activate

pre-commit: $(VENV_NAME)
$(VENV_NAME)/bin/pre-commit install
GIT_CONFIG=/dev/null $(VENV_NAME)/bin/pre-commit install

# Tests
test: $(VENV_NAME)
Expand All @@ -53,3 +54,19 @@ release: # run on main branch only
clean:
rm -rf "$(VENV_NAME)"
find . -iname "*.pyc" -delete

# Sync to public GitHub repo
sync:
@echo "Syncing to public GitHub repo..."
@rsync -av --delete \
--exclude='.git/' \
--exclude='.venv/' \
--exclude='content/' \
--exclude='static/' \
--exclude='contentspec.yaml' \
--exclude='docs/' \
--exclude='.gitignore' \
--exclude='*.pyc' \
--exclude='__pycache__/' \
./ $(PUBLIC_REPO)/
@echo "Sync complete!"

This file was deleted.

58 changes: 0 additions & 58 deletions content/advanced/hooks/example-in-python/challenge/index.md

This file was deleted.

This file was deleted.

147 changes: 0 additions & 147 deletions content/advanced/hooks/example-in-python/cleanup/index.md

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions content/advanced/hooks/example-in-python/conclusion/index.md

This file was deleted.

This file was deleted.

Loading
Loading