diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml new file mode 100644 index 0000000..c6a292c --- /dev/null +++ b/.github/workflows/main-build.yml @@ -0,0 +1,37 @@ +# Side-car CI/CD script to ensure that the rename script works. +name: CI-Build + +on: + push: + branches: + - main + - feature/* + - dependabot/* + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + name: Test rename script + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 + + - name: Setup uv + uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7 + with: + enable-cache: true + + - name: Setup Python + run: uv python install 3.14 + + - name: Run rename + run: ./rename_template.sh mymod + + - name: Run basic build process + run: make diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6c32b15..dc957e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,4 @@ +# Main CI/CD script for your project name: CI on: diff --git a/Makefile b/Makefile index d88e55d..66d651d 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ clean: ## Remove .venv, caches, and build artifacts find . -type d \ -name ".venv" -o \ -name ".tox" -o \ + -name ".coverage" -o \ -name ".ropeproject" -o \ -name ".mypy_cache" -o \ -name ".ruff_cache" -o \ diff --git a/rename_template.sh b/rename_template.sh index 078cb40..0f607b5 100755 --- a/rename_template.sh +++ b/rename_template.sh @@ -30,7 +30,7 @@ do sed -i.rename-bak "s/my_module/$1/g" $file done # Reset version -sed -i.rename-bak "s/version = .*/version = \"0.0.1\"/g" pyproject.toml +sed -i.rename-bak "s/^version = .*/version = \"0.0.1\"/g" pyproject.toml # Overwrite README file cat <README.md @@ -39,4 +39,4 @@ EOF # Clean up find . -type f -iname "*.rename-bak" -exec rm -f {} \; -rm -f $( basename $0 ) CHANGELOG.md +rm -rf $( basename $0 ) CHANGELOG.md CLAUDE.md .claude .github/workflows/main-build.yml