55
66set -e # Exit on error
77
8- echo " 🧪 Starting local publish test..."
8+ echo " [TEST] Starting local publish test..."
99echo " "
1010
1111# Colors for output
@@ -23,25 +23,25 @@ rm -rf sdks/python/generated
2323rm -rf sdks/python/dist
2424rm -rf sdks/python/build
2525rm -rf sdks/python/* .egg-info
26- echo -e " ${GREEN} ✓ Clean complete${NC} "
26+ echo -e " ${GREEN} [OK] Clean complete${NC} "
2727echo " "
2828
2929# Step 2: Install dependencies
3030echo -e " ${BLUE} Step 2: Installing dependencies...${NC} "
3131npm ci
32- echo -e " ${GREEN} ✓ Dependencies installed${NC} "
32+ echo -e " ${GREEN} [OK] Dependencies installed${NC} "
3333echo " "
3434
3535# Step 3: Generate SDKs
3636echo -e " ${BLUE} Step 3: Generating SDKs...${NC} "
3737npm run generate:sdk:all --workspace=pmxt-core
38- echo -e " ${GREEN} ✓ SDKs generated${NC} "
38+ echo -e " ${GREEN} [OK] SDKs generated${NC} "
3939echo " "
4040
4141# Step 4: Build all workspaces
4242echo -e " ${BLUE} Step 4: Building all workspaces...${NC} "
4343npm run build --workspaces
44- echo -e " ${GREEN} ✓ All workspaces built${NC} "
44+ echo -e " ${GREEN} [OK] All workspaces built${NC} "
4545echo " "
4646
4747# Step 5: Start server and run tests
@@ -57,31 +57,31 @@ until curl -s http://localhost:3847/health > /dev/null 2>&1; do
5757 sleep 1
5858 ELAPSED=$(( ELAPSED + 1 ))
5959 if [ $ELAPSED -ge $TIMEOUT ]; then
60- echo -e " ${RED} ✗ Server failed to start within ${TIMEOUT} seconds${NC} "
60+ echo -e " ${RED} [FAIL] Server failed to start within ${TIMEOUT} seconds${NC} "
6161 kill $SERVER_PID 2> /dev/null || true
6262 exit 1
6363 fi
6464done
65- echo -e " ${GREEN} ✓ Server is ready!${NC} "
65+ echo -e " ${GREEN} [OK] Server is ready!${NC} "
6666echo " "
6767
6868# Step 6: Run tests
6969echo -e " ${BLUE} Step 6: Running tests...${NC} "
7070npm test --workspaces || {
71- echo -e " ${RED} ✗ Tests failed${NC} "
71+ echo -e " ${RED} [FAIL] Tests failed${NC} "
7272 kill $SERVER_PID 2> /dev/null || true
7373 exit 1
7474}
75- echo -e " ${GREEN} ✓ All tests passed${NC} "
75+ echo -e " ${GREEN} [OK] All tests passed${NC} "
7676echo " "
7777
7878# Step 7: Dry run publish
7979echo -e " ${BLUE} Step 7: Dry run publish (pmxt-core)...${NC} "
8080npm publish --workspace=pmxt-core --dry-run 2>&1 | tee /tmp/pmxt-core-publish.log || {
8181 if grep -q " cannot publish over the previously published versions" /tmp/pmxt-core-publish.log; then
82- echo -e " ${GREEN} ✓ pmxt-core package is valid (version already published - expected)${NC} "
82+ echo -e " ${GREEN} [OK] pmxt-core package is valid (version already published - expected)${NC} "
8383 else
84- echo -e " ${RED} ✗ Dry run publish failed for pmxt-core${NC} "
84+ echo -e " ${RED} [FAIL] Dry run publish failed for pmxt-core${NC} "
8585 kill $SERVER_PID 2> /dev/null || true
8686 exit 1
8787 fi
@@ -91,9 +91,9 @@ echo ""
9191echo -e " ${BLUE} Step 8: Dry run publish (pmxtjs)...${NC} "
9292npm publish --workspace=pmxtjs --dry-run 2>&1 | tee /tmp/pmxtjs-publish.log || {
9393 if grep -q " cannot publish over the previously published versions" /tmp/pmxtjs-publish.log; then
94- echo -e " ${GREEN} ✓ pmxtjs package is valid (version already published - expected)${NC} "
94+ echo -e " ${GREEN} [OK] pmxtjs package is valid (version already published - expected)${NC} "
9595 else
96- echo -e " ${RED} ✗ Dry run publish failed for pmxtjs${NC} "
96+ echo -e " ${RED} [FAIL] Dry run publish failed for pmxtjs${NC} "
9797 kill $SERVER_PID 2> /dev/null || true
9898 exit 1
9999 fi
@@ -111,31 +111,31 @@ pip install . > /dev/null 2>&1
111111
112112# Run Python tests
113113pytest || {
114- echo -e " ${RED} ✗ Python tests failed${NC} "
114+ echo -e " ${RED} [FAIL] Python tests failed${NC} "
115115 kill $SERVER_PID 2> /dev/null || true
116116 exit 1
117117}
118- echo -e " ${GREEN} ✓ Python tests passed${NC} "
118+ echo -e " ${GREEN} [OK] Python tests passed${NC} "
119119echo " "
120120
121121# Build Python package
122122echo -e " ${BLUE} Step 10: Building Python package...${NC} "
123123python3 -m build || {
124- echo -e " ${RED} ✗ Python build failed${NC} "
124+ echo -e " ${RED} [FAIL] Python build failed${NC} "
125125 kill $SERVER_PID 2> /dev/null || true
126126 exit 1
127127}
128- echo -e " ${GREEN} ✓ Python package built${NC} "
128+ echo -e " ${GREEN} [OK] Python package built${NC} "
129129echo " "
130130
131131# Verify package metadata
132132echo -e " ${BLUE} Step 11: Verifying Python package metadata...${NC} "
133133twine check dist/* || {
134- echo -e " ${RED} ✗ Python package metadata verification failed${NC} "
134+ echo -e " ${RED} [FAIL] Python package metadata verification failed${NC} "
135135 kill $SERVER_PID 2> /dev/null || true
136136 exit 1
137137}
138- echo -e " ${GREEN} ✓ Python package metadata verified${NC} "
138+ echo -e " ${GREEN} [OK] Python package metadata verified${NC} "
139139echo " "
140140
141141cd ../..
@@ -145,7 +145,7 @@ kill $SERVER_PID 2>/dev/null || true
145145
146146echo " "
147147echo -e " ${GREEN} ========================================${NC} "
148- echo -e " ${GREEN} ✓ All tests passed successfully!${NC} "
148+ echo -e " ${GREEN} [OK] All tests passed successfully!${NC} "
149149echo -e " ${GREEN} ========================================${NC} "
150150echo " "
151151echo " You can now safely push to GitHub."
0 commit comments