Skip to content

Commit

Permalink
Merge pull request #712 from rage/fix-again
Browse files Browse the repository at this point in the history
Fix again
  • Loading branch information
nygrenh authored Jan 26, 2024
2 parents fb9126e + ab96ed9 commit cb97d54
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 18 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Package extension
run: |
npm run ci:all
npm install -g @vscode/vsce
npm run webpack
vsce package ${{ env.PRERELEASE }}
chmod +x bin/package.bash
bin/package.bash ${{ env.PRERELEASE }}
# move packaged extension from project root to own release folder
mkdir extension && mv *.vsix extension
env:
Expand Down
4 changes: 4 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ webview-ui/package.json
webview-ui/package-lock.json
webview-ui/rollup.config.js
webview-ui/node_modules/**

# Other files
.*
.*/
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [3.0.0] - 2024-01-25
## [3.0.1] - 2024-01-25

- Redesigned the user interface
- Fixed a bug when changing the exercise directory on Windows
Expand Down
18 changes: 7 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,22 @@ git clone https://github.com/rage/tmc-vscode.git

### Preparing the repository

From a terminal, where you have cloned the repository, execute the following command to install the required dependencies:

```bash
npm ci
```

Update the `tmc-python-tester` submodule
From a terminal, where you have cloned the repository, update the `tmc-python-tester` submodule

```bash
git submodule init && git submodule update
```

Then prepare the backend:
Then execute the following command to install the required dependencies:

```bash
cd backend && npm ci && npm run setup
npm run ci:all
```

As well as the webview:
Then prepare the backend:

```bash
cd webview && npm ci
cd backend && npm run setup
```

You will need to rerun the setup when langs is updated, as this step will download the appropriate version of the CLI for the integration tests.
Expand Down Expand Up @@ -112,6 +106,8 @@ You can update the `package-lock.json` version with `npm i --package-lock-only`.

You can run the script manually by giving the GitHub release tag you're going to use as an argument. For example `./bin/validateRelease.sh v3.0.0-prerelease`.

The extension is packaged using the script `./bin/package.bash`. Like the validation script, you should install and test the resulting package manually to ensure there's no problems with the packaging. (You can install the extension from the package by selecting `Extensions: Install from VSIX` from the command palette) (TODO: automatically test the actual package somehow?)

## Other notes

Running the extension produces the following superfluous warnings:
Expand Down
18 changes: 18 additions & 0 deletions bin/package.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -euxo pipefail

# requires @vscode/vsce
# the script takes an argument that can be set to "--pre-release" to package as a pre-release
PRERELEASE_ARG=${1:-""}

# clean old artifacts to ensure that local packages match the CI where they don't exist
# otherwise, a package could work locally because some file happened to be there that's not there in CI
rm -rf ./dist
rm -rf ./webview-ui/public/build

# run ci and build webview
npm run ci:all
npm run webview:build

# create package
npx vsce package ${PRERELEASE_ARG}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "test-my-code",
"displayName": "TestMyCode",
"version": "3.0.0",
"version": "3.0.1",
"description": "TestMyCode extension for Visual Studio Code",
"categories": [
"Other"
Expand Down

0 comments on commit cb97d54

Please sign in to comment.