Skip to content

Commit adc6005

Browse files
committed
chore: release v1.9.4 β€” fix README.MD casing in release workflow
1 parent 3ec299f commit adc6005

5 files changed

Lines changed: 90 additions & 10 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copilot Instructions for phpvm
2+
3+
## Project Context
4+
5+
phpvm is a PHP Version Manager written as a single bash script (`phpvm.sh`). It supports macOS (Homebrew) and Linux (apt, dnf, yum, pacman). Tests use BATS.
6+
7+
## Code Style
8+
9+
- POSIX-compliant bash where possible
10+
- All global variables must be prefixed with `PHPVM_` to avoid namespace pollution when sourced
11+
- Use `command` prefix for external commands (e.g., `command grep`, `command awk`)
12+
- Use `printf '%s\n'` instead of `echo` when piping variable content to avoid `-n`/`-e` interpretation
13+
- Use `if/then/fi` instead of `[ test ] && cmd` for functions that must return 0 on success
14+
- Use `while IFS= read -r` loops instead of `for x in $(...)` to avoid word-splitting issues
15+
- Prefer `command_exists` helper over inline `command -v X > /dev/null 2>&1`
16+
17+
## Testing
18+
19+
```bash
20+
bash -n phpvm.sh # Syntax check
21+
bats tests/ # Run all tests
22+
bats tests/01_core.bats # Run specific test file
23+
```
24+
25+
Tests run in isolated mock environments with `PHPVM_TEST_MODE=true`.
26+
27+
## Release Procedure
28+
29+
Conventions: tag = `X.Y.Z` (no `v` prefix), title = `vX.Y.Z` (with `v` prefix).
30+
31+
1. Bump `PHPVM_VERSION` in `phpvm.sh`
32+
2. Add entry to `CHANGELOG.md` under `[Unreleased]` with format:
33+
```
34+
## [vX.Y.Z](https://github.com/Thavarshan/phpvm/compare/vPREV...vX.Y.Z) - YYYY-MM-DD
35+
```
36+
3. Run `bash -n phpvm.sh && bats tests/` β€” all tests must pass
37+
4. Commit: `git commit -m "chore: release vX.Y.Z β€” short description"`
38+
5. Push: `git push origin main`
39+
6. Create release: `gh release create X.Y.Z --title "vX.Y.Z" --notes-file <file>`
40+
- Use `--notes-file` for multi-line notes to avoid shell quoting issues
41+
42+
## Key Environment Variables
43+
44+
- `PHPVM_DIR` β€” Installation directory (default: `~/.phpvm`)
45+
- `PHPVM_TEST_MODE` β€” Enable test/mock mode
46+
- `DEBUG` β€” Enable debug logging
47+
- `PHPVM_AUTO_USE` β€” Enable automatic `.phpvmrc` detection
48+
- `PHPVM_PHPVMRC_MAX_DEPTH` β€” Max parent directory traversal for `.phpvmrc` (default: 25)

β€Ž.github/workflows/release.ymlβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
required_files=(
2323
"phpvm.sh"
2424
"install.sh"
25-
"README.MD"
25+
"README.md"
2626
"CHANGELOG.md"
2727
"LICENSE"
2828
)
@@ -63,7 +63,7 @@ jobs:
6363
sections=("Installation" "Usage" "Commands")
6464
6565
for section in "${sections[@]}"; do
66-
if grep -qi "$section" README.MD; then
66+
if grep -qi "$section" README.md; then
6767
echo "βœ“ README contains $section section"
6868
else
6969
echo "⚠ README might be missing $section section"
@@ -89,7 +89,7 @@ jobs:
8989
mkdir -p dist
9090
cp phpvm.sh dist/
9191
cp install.sh dist/
92-
cp README.MD dist/
92+
cp README.md dist/
9393
cp LICENSE dist/
9494
cp CHANGELOG.md dist/
9595

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
## [Unreleased]
44

5+
## [v1.9.4](https://github.com/Thavarshan/phpvm/compare/v1.9.3...v1.9.4) - 2026-03-15
6+
7+
### Fixed
8+
9+
- **Fixed `README.MD` β†’ `README.md` casing in `release.yml`:** The release workflow referenced `README.MD` but the file is `README.md`, causing CI failures on case-sensitive Linux filesystems.
10+
- **Fixed `README.MD` β†’ `README.md` casing in `CLAUDE.md` file structure diagram.**
11+
12+
### Internal
13+
14+
- **Version bump:** Updated to v1.9.4.
15+
516
## [v1.9.3](https://github.com/Thavarshan/phpvm/compare/v1.9.2...v1.9.3) - 2026-03-15
617

718
### Fixed

β€ŽCLAUDE.mdβ€Ž

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,32 @@ time ./phpvm.sh help
116116
```
117117

118118
### Release Process
119-
1. Update version number in `PHPVM_VERSION` variable
120-
2. Update CHANGELOG.md with new features/fixes
121-
3. Test across different platforms
122-
4. Ensure all tests pass
123-
5. Update README.md if needed
119+
120+
Conventions: tag = `X.Y.Z` (no `v` prefix), title = `vX.Y.Z` (with `v` prefix).
121+
122+
1. **Bump version** in `PHPVM_VERSION` variable at the top of `phpvm.sh`
123+
2. **Update CHANGELOG.md** β€” add a new section under `[Unreleased]` following the existing format:
124+
```
125+
## [vX.Y.Z](https://github.com/Thavarshan/phpvm/compare/vPREV...vX.Y.Z) - YYYY-MM-DD
126+
```
127+
Use subsections: `### Fixed`, `### Changed`, `### Removed`, `### Internal` as needed.
128+
3. **Verify syntax and tests pass:**
129+
```bash
130+
bash -n phpvm.sh
131+
bats tests/
132+
```
133+
4. **Commit and push:**
134+
```bash
135+
git add phpvm.sh CHANGELOG.md
136+
git commit -m "chore: release vX.Y.Z β€” short description"
137+
git push origin main
138+
```
139+
5. **Create GitHub release** (triggers the `release.yml` workflow):
140+
```bash
141+
gh release create X.Y.Z --title "vX.Y.Z" --notes-file /path/to/notes.md
142+
```
143+
Or use `--notes "..."` for short notes. Prefer `--notes-file` for multi-line content to avoid shell quoting issues.
144+
6. **Update README.md** if needed (new features, changed env vars, etc.)
124145

125146
## Key Functions in phpvm.sh
126147

@@ -139,7 +160,7 @@ phpvm/
139160
β”œβ”€β”€ CLAUDE.md # This file
140161
β”œβ”€β”€ CHANGELOG.md # Release history
141162
β”œβ”€β”€ LICENSE # MIT license
142-
β”œβ”€β”€ README.MD # User documentation
163+
β”œβ”€β”€ README.md # User documentation
143164
β”œβ”€β”€ TESTING.md # Testing documentation (minimal)
144165
β”œβ”€β”€ assets/ # Project images
145166
β”œβ”€β”€ install-bats.sh # BATS installation script

β€Žphpvm.shβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# shellcheck disable=SC2155 # Allow declare and assign on same line for better readability
1313

14-
PHPVM_VERSION="1.9.3"
14+
PHPVM_VERSION="1.9.4"
1515

1616
# Test mode flag
1717
PHPVM_TEST_MODE="${PHPVM_TEST_MODE:-false}"

0 commit comments

Comments
Β (0)