Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1dffc60
feat: Initial Divengine CLI with core commands and ANSI console output
rafageist Mar 28, 2026
7617173
feat: add divengine/div as required dependency
rafageist Mar 28, 2026
e56fe87
feat: Add InputParser, PHAR builder, and release workflow
rafageist Mar 28, 2026
f127673
feat: Add CI workflows and static analysis
rafageist Mar 28, 2026
837f02e
fix: Add phpstan as dev dependency
rafageist Mar 28, 2026
6ed3092
fix: Update composer.lock with phpstan
rafageist Mar 28, 2026
d64790a
fix: Fix phpstan.neon configuration
rafageist Mar 28, 2026
eb54d3a
feat: Add documentation and PDF generation for releases
rafageist Mar 28, 2026
aa366a1
docs: Remove template syntax section (documented in divengine/div)
rafageist Mar 28, 2026
dff76c1
docs: Rename PDF to div-cli-{version}.pdf and update index
rafageist Mar 28, 2026
9b7b965
docs: Fix filenames (remove URL encoding)
rafageist Mar 28, 2026
db51430
chore: Remove ASCII art banners from install scripts
rafageist Mar 28, 2026
702c56e
chore: Remove redundant bin/install scripts (use root install scripts…
rafageist Mar 28, 2026
82a788b
feat: Add --local option to install scripts for development
rafageist Mar 29, 2026
6f568be
chore: Rename --local to --from-here for install scripts
rafageist Mar 29, 2026
ce2cdda
chore: Add GPL license and doc headers to all PHP files
rafageist Mar 29, 2026
70c78d5
chore: Remove transform command
rafageist Mar 29, 2026
54a5f71
chore: Remove doctor command
rafageist Mar 29, 2026
67f3d51
chore: Remove resolve command
rafageist Mar 29, 2026
150a8da
feat: Support .div files in templates command
rafageist Mar 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PHPStan

on:
pull_request:
branches: [ main ]
workflow_dispatch:

concurrency:
group: phpstan-${{ github.ref }}
cancel-in-progress: true

jobs:
phpstan:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none

- name: Validate composer.json
run: composer validate --no-interaction

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress

- name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon --no-progress --memory-limit=1G
115 changes: 115 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: write

env:
PHP_VERSION: '8.2'

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version
id: version
run: |
# Get the latest tag on main
LAST_TAG=$(git describe --tags --abbrev=0 HEAD 2>/dev/null || echo "v0.0.0")

# Count commits since last tag
COMMITS=$(git rev-list $LAST_TAG..HEAD --count)

# If no commits since last tag, use the tag itself
if [ "$COMMITS" = "0" ]; then
echo "version=$LAST_TAG" >> $GITHUB_OUTPUT
else
# Extract major.minor from last tag
MAJOR_MINOR=$(echo $LAST_TAG | sed -E 's/^v([0-9]+\.[0-9]+).*/\1/')
# Create new patch version
echo "version=v${MAJOR_MINOR}.${COMMITS}" >> $GITHUB_OUTPUT
fi

echo "tag=div-${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: phar
tools: composer:v2

- name: Install dependencies
run: composer install --no-interaction --prefer-dist

- name: Build PHAR
run: php -d phar.readonly=0 build/build-phar.php

- name: Test PHAR
run: |
php build/div.phar version
php build/div.phar --help

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Pandoc and LaTeX
run: |
sudo apt-get update
sudo apt-get install -y pandoc texlive-xetex texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended

- name: Build PDF documentation
run: |
python scripts/build_pdf.py --output build/div-cli-${{ steps.version.outputs.version }}.pdf --title "Div CLI ${{ steps.version.outputs.version }}"

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.version }}
name: div CLI ${{ steps.version.outputs.version }}
body: |
## div CLI ${{ steps.version.outputs.version }}

**divengine/cli** - Runtime CLI for the Divengine template ecosystem.

### Installation

**Unix/macOS:**
```bash
curl -sSL https://raw.githubusercontent.com/divengine/cli/${{ steps.version.outputs.version }}/install | php
```

**Windows (with PHP):**
```bash
php -r "copy('https://raw.githubusercontent.com/divengine/cli/${{ steps.version.outputs.version }}/install', 'div');"
```

**Direct download:**
Download `div.phar` from the assets below and make it executable.

### What's new

See [CHANGELOG](https://github.com/divengine/cli/blob/${{ steps.version.outputs.version }}/CHANGELOG.md) for details.

### Requirements

- PHP >= 8.1
files: |
build/div.phar
build/div-cli-${{ steps.version.outputs.version }}.pdf
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests

on:
pull_request:
branches: [ main ]
workflow_dispatch:

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

jobs:
phpunit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none

- name: Validate composer.json
run: composer validate --no-interaction

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress

- name: Run tests
run: vendor/bin/phpunit --colors=never
Loading
Loading