Skip to content

Commit 8d3409e

Browse files
committed
chore: clean up repo structure - move scripts to scripts/ directory
- Moved release.sh, test-publish-local.sh, test-version-update.sh, and update-versions.js to scripts/ - Updated GitHub Actions workflow to reference new script paths - Updated release.sh usage instructions - Added scripts/README.md to document all utility scripts
1 parent 818424d commit 8d3409e

File tree

6 files changed

+75
-6
lines changed

6 files changed

+75
-6
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
echo "Publishing version: $VERSION"
2929
3030
- name: Update package versions
31-
run: node update-versions.js ${{ steps.get_version.outputs.version }}
31+
run: node scripts/update-versions.js ${{ steps.get_version.outputs.version }}
3232

3333
- name: Install dependencies
3434
run: npm ci
@@ -82,7 +82,7 @@ jobs:
8282
echo "Publishing version: $VERSION"
8383
8484
- name: Update package versions
85-
run: node update-versions.js ${{ steps.get_version.outputs.version }}
85+
run: node scripts/update-versions.js ${{ steps.get_version.outputs.version }}
8686

8787
- name: Generate SDKs
8888
run: |

scripts/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Scripts
2+
3+
This directory contains utility scripts for the PMXT project.
4+
5+
## Available Scripts
6+
7+
### `release.sh`
8+
Release automation script that creates and pushes version tags.
9+
10+
**Usage:**
11+
```bash
12+
./scripts/release.sh <version>
13+
```
14+
15+
**Example:**
16+
```bash
17+
./scripts/release.sh 0.5.0
18+
```
19+
20+
**What it does:**
21+
1. Validates version format
22+
2. Creates a git tag `v<version>`
23+
3. Pushes the tag to GitHub
24+
4. Triggers GitHub Actions to build and publish all packages
25+
26+
---
27+
28+
### `update-versions.js`
29+
Node.js script to update version numbers across all package files.
30+
31+
**Usage:**
32+
```bash
33+
node scripts/update-versions.js <version>
34+
```
35+
36+
**What it updates:**
37+
- `core/package.json`
38+
- `sdks/javascript/package.json`
39+
- `sdks/python/pyproject.toml`
40+
41+
---
42+
43+
### `test-publish-local.sh`
44+
Test script for validating the publish workflow locally before pushing tags.
45+
46+
**Usage:**
47+
```bash
48+
./scripts/test-publish-local.sh
49+
```
50+
51+
**What it does:**
52+
1. Builds all packages
53+
2. Starts the PMXT server
54+
3. Runs all SDK tests
55+
4. Validates everything works before release
56+
57+
---
58+
59+
### `test-version-update.sh`
60+
Test script for validating the version update functionality.
61+
62+
**Usage:**
63+
```bash
64+
./scripts/test-version-update.sh
65+
```
66+
67+
**What it does:**
68+
1. Tests version number extraction from git tags
69+
2. Validates that `update-versions.js` correctly updates all package files

release.sh renamed to scripts/release.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash
22

33
# Release script for PMXT
4-
# Usage: ./release.sh <version>
5-
# Example: ./release.sh 0.5.0
4+
# Usage: ./scripts/release.sh <version>
5+
# Example: ./scripts/release.sh 0.5.0
66

77
set -e
88

99
if [ -z "$1" ]; then
1010
echo "[ERROR] Error: Version number required"
11-
echo "Usage: ./release.sh <version>"
12-
echo "Example: ./release.sh 0.5.0"
11+
echo "Usage: ./scripts/release.sh <version>"
12+
echo "Example: ./scripts/release.sh 0.5.0"
1313
exit 1
1414
fi
1515

0 commit comments

Comments
 (0)