Skip to content

Commit

Permalink
Merge branch 'master' into highprecision
Browse files Browse the repository at this point in the history
# Conflicts:
#	packaging/src/main/scripts/README_VSCODE
#	packaging/src/main/scripts/vscode.sh
  • Loading branch information
nickbattle committed Nov 1, 2023
2 parents 722e150 + 17f5ae9 commit 224dee8
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packaging/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,14 @@
<fileMode>0777</fileMode>
</file>
<file>
<source>src/main/scripts/vscode.sh</source>
<destName>vscode.sh</destName>
<source>src/main/scripts/vsix.sh</source>
<destName>vsix.sh</destName>
<fileMode>0777</fileMode>
</file>
<file>
<source>src/main/scripts/README_VDMJ</source>
<destName>README_VDMJ</destName>
</file>
<file>
<source>src/main/scripts/README_VSCODE</source>
<destName>README_VSCODE</destName>
</file>
</files>

<fileSets>
Expand Down
56 changes: 56 additions & 0 deletions packaging/src/main/scripts/vsix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash
#
# Update a VDM VSCode VSIX, using the jars in this distribution.
# Download VSIX from https://marketplace.visualstudio.com/items?itemName=overturetool.vdm-vscode
#

function usage()
{
echo "Usage: $(basename $0) <VDM VSCode VSIX>"
echo "e.g. $(basename $0) overturetool.vdm-vscode-1.3.7.vsix"
exit 1
}

if [ $# -ne 1 -o "$1" = "-help" ]
then
usage
fi

VERSION="4.5.0-P-SNAPSHOT"
VDMJ="vdmj_hp"

SELF=$(which "$0")
DISTRIBUTION=$(dirname "$SELF")
VSIX=$(realpath ${1})

if [ ! -e "$VSIX" ]
then
echo "Cannot find VDM VSCode VSIX at $VSIX"
usage
fi

if [[ "$VSIX" != *.vsix ]]
then
echo "File passed is not a VSIX?"
usage
fi

echo "**************************** Updating VSIX! ****************************"
(
cd "$DISTRIBUTION"
rm -rf extension
EXTRACT="extension/resources/jars"
unzip -q "$VSIX" "$EXTRACT/$VDMJ/*" "$EXTRACT/plugins/*"

cp -vf vdmj-$VERSION.jar $EXTRACT/$VDMJ
cp -vf lsp-$VERSION.jar $EXTRACT/$VDMJ
cp -vf annotations-$VERSION.jar $EXTRACT/$VDMJ
cp -vf stdlib-$VERSION.jar $EXTRACT/$VDMJ/libs
cp -vf quickcheck-$VERSION.jar $EXTRACT/plugins

zip -q "$VSIX" $(find $EXTRACT -type f)
rm -rf extension
)
echo "**************************** FINISHED **********************************"

exit 0

0 comments on commit 224dee8

Please sign in to comment.