Skip to content

Commit

Permalink
chore: add package:test for easy create and zip local version
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu committed Oct 26, 2024
1 parent 0b74e03 commit ac39ebf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@
"deploy": "npx vsce publish -p",
"deploy:insider": "node scripts/deploy-insider.js",
"deploy:openvsx": "sh scripts/deploy-openvsx.sh",
"package": "npx vsce package"
"package": "npx vsce package",
"package:test": "sh scripts/package-test.sh"
},
"devDependencies": {
"@types/fs-extra": "8.1.0",
Expand Down
11 changes: 11 additions & 0 deletions scripts/package-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/zsh

PACKAGE_VERSION=$(grep version package.json | sed 's/.*"version": "\(.*\)".*/\1/')

GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

echo "${BLUE}Packaging extension for version $PACKAGE_VERSION${NC}"
yarn package && zip compare-folders-$PACKAGE_VERSION.vsix.zip compare-folders-$PACKAGE_VERSION.vsix
echo "${GREEN}Packaged extension for version $PACKAGE_VERSION${NC}"

0 comments on commit ac39ebf

Please sign in to comment.