Skip to content

Commit

Permalink
Adds package ci for vscode extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdstein committed Nov 17, 2023
1 parent 15a6fd1 commit 8ead7da
Show file tree
Hide file tree
Showing 27 changed files with 60 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
jupyterlab:
uses: ./.github/workflows/jupyterlab.yaml
positron:
uses: ./.github/workflows/positron.yaml
uses: ./.github/workflows/vscode.yaml
20 changes: 20 additions & 0 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Main
on:
push:
branches:
- tdstein/347
jobs:
vscode:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: just vscode install
- run: just vscode package $(just name) $(just version) $(pwd)
- uses: actions/upload-artifact@v3
id: upload
with:
name: extensions
path: *.vsix
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
jupyterlab:
uses: ./.github/workflows/jupyterlab.yaml
positron:
uses: ./.github/workflows/positron.yaml
uses: ./.github/workflows/vscode.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Positron
name: VSCode
on:
workflow_call:
jobs:
Expand All @@ -18,16 +18,16 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: just positron install
- run: just positron lint
- run: just positron test
- run: just vscode install
- run: just vscode lint
- run: just vscode test
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- run: just positron install
- run: just positron lint
- run: just positron test
- run: just vscode install
- run: just vscode lint
- run: just vscode test
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions extensions/positron/justfile → extensions/vscode/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ clean:
set -eou pipefail
{{ _with_debug }}
rm -f *.vsix
rm -rf .vscode-test
rm -rf node_modules
rm -rf out


# Install dependencies
Expand All @@ -46,6 +49,15 @@ lint:
npm run lint

# Packages the extension
package name version outpath="$(pwd)":
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}
npx @vscode/vsce package --skip-license -o {{ outpath }}/{{ name }}-{{ version }}.vsix


# Executes commands via `npm`. Equivalent to `npm run`. Provides arbitrary command chaining inside of Docker from project root (i.e., `just positron run test`)
run *args:
#!/usr/bin/env bash
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "positron-publisher",
"name": "publisher",
"displayName": "Positron Publisher",
"description": "Publish your applications from Positron to Posit products",
"version": "0.0.1",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "https://github.com/rstudio/publishing-client/tree/main/extensions/positron"
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 13 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,20 +191,20 @@ lint: stub
just _with_docker go vet -all ./...
just _with_docker ./scripts/fmt-check.bash

# Prints the pre-release status based on the version (see `just version`).
pre-release:
name:
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}
./scripts/is-pre-release.bash
basename {{ _cmd }}

positron *args:
# Prints the pre-release status based on the version (see `just version`).
pre-release:
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}
just _with_docker just extensions/positron/{{ args }}
./scripts/is-pre-release.bash

# Runs the CLI via `go run`.
run *args:
Expand Down Expand Up @@ -261,6 +261,14 @@ version:
./scripts/get-version.bash

# Executes commands in ./extensions/vscode/Justfile. Equivalent to `just extensions/vscode`, but inside of Docker (i.e., just _with_docker extension/vscode)
vscode *args:
#!/usr/bin/env bash
set -eou pipefail
{{ _with_debug }}
just _with_docker just extensions/vscode/{{ args }}

[private]
_with_docker *args:
#!/usr/bin/env bash
Expand Down

0 comments on commit 8ead7da

Please sign in to comment.