-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·44 lines (36 loc) · 851 Bytes
/
Copy pathtest.sh
File metadata and controls
executable file
·44 lines (36 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Function to check the last command's exit status
check_status() {
if [ $? -ne 0 ]; then
echo "Error: $1 failed"
exit 1
fi
}
# Clean up the test environment
echo "Cleaning up test environment..."
rm -rf .vscode-test
check_status "Cleanup"
# Compile the project
echo "Compiling TypeScript..."
npm run compile
check_status "Compilation"
# Run the linter
echo "Running linter..."
npm run lint
check_status "Linting"
# Run the tests
echo "Running tests..."
npm run test -- --verbose
# Check the exit status of the test command
if [ $? -eq 0 ]; then
echo "All tests passed successfully!"
else
echo "Some tests failed. Please check the output above."
exit 1
fi
# Create VSIX file
echo "Creating VSIX file..."
npx vsce package
check_status "VSIX creation"
echo "VSIX file created successfully!"
exit 0