File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 "license" : " BUSL-1.1" ,
99 "repository" : {
1010 "type" : " git" ,
11- "url" : " git@ github.com: ControlForge-Systems/controlforge-structured-text.git "
11+ "url" : " https:// github.com/ ControlForge-Systems/controlforge-structured-text"
1212 },
1313 "bugs" : {
1414 "url" : " https://github.com/ControlForge-Systems/controlforge-structured-text/issues"
1515 },
1616 "homepage" : " https://controlforge.dev/" ,
1717 "icon" : " icon.png" ,
18+ "baseContentUrl" : " https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main" ,
19+ "baseImagesUrl" : " https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main/images" ,
1820 "engines" : {
1921 "vscode" : " ^1.100.0"
2022 },
8587 "vscode:prepublish" : " npm run compile" ,
8688 "compile" : " tsc -p ./" ,
8789 "watch" : " tsc -watch -p ./" ,
88- "package" : " vsce package" ,
89- "publish" : " vsce publish" ,
90- "set-pat" : " vsce login ControlForgeSystems" ,
91- "publish:secure" : " ./publish-extension.sh" ,
92- "publish:pat" : " vsce publish -p $VSCE_PAT"
90+ "package" : " vsce package --baseContentUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main --baseImagesUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main/images" ,
91+ "publish" : " vsce publish --baseContentUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main --baseImagesUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main/images"
9392 },
9493 "dependencies" : {
9594 "vscode-languageclient" : " ^9.0.1" ,
108107 "mocha" : " ^11.6.0" ,
109108 "typescript" : " ^4.9.4"
110109 }
111- }
110+ }
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # Script for securely publishing VS Code extension
32
4- # Check if PAT is provided
5- if [ -z " $1 " ]; then
6- echo " Error: Personal Access Token (PAT) is required"
7- echo " Usage: ./publish-extension.sh <your-pat>"
8- exit 1
9- fi
3+ # Script to package and publish the ControlForge Structured Text extension
4+
5+ # Ensure script exits on error
6+ set -e
107
11- # Export PAT as environment variable
12- export VSCE_PAT=" $1 "
8+ # Display info
9+ echo " === ControlForge Structured Text Extension Packaging ==="
10+ echo " Building and packaging extension..."
1311
14- # Package and publish
12+ # Compile the extension
1513npm run compile
16- npm run package
17- vsce publish -p " $VSCE_PAT "
1814
19- # Clear the PAT from environment after publishing
20- unset VSCE_PAT
15+ # Package the extension with correct image URLs
16+ vsce package --baseContentUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main --baseImagesUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main/images
17+
18+ # Ask if user wants to publish
19+ read -p " Do you want to publish the extension to VS Code Marketplace? (y/n): " PUBLISH
20+
21+ if [[ $PUBLISH == " y" || $PUBLISH == " Y" ]]; then
22+ echo " Publishing extension to VS Code Marketplace..."
23+ vsce publish --baseContentUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main --baseImagesUrl=https://github.com/ControlForge-Systems/controlforge-structured-text/raw/main/images
24+ echo " Extension published successfully!"
25+ else
26+ echo " Extension packaged but not published."
27+ echo " To publish manually, run: npm run publish"
28+ fi
2129
22- echo " Extension published successfully !"
30+ echo " Done !"
You can’t perform that action at this time.
0 commit comments