Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
EXTENSION_VSIX="The name of the VS Code extension file." # Plain
GITHUB_TOKEN="The GitHub token to use for API requests." # Secret
TARGET_PLATFORM="The target platform to build binary artifacts for." # Plain
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export TARGET_PLATFORM="$(go env GOOS)/$(go env GOARCH)"
export EXTENSION_VSIX="runme-extension-${TARGET_PLATFORM/\//-}.vsix"
export GITHUB_TOKEN=$(gh auth token)
export GOAWAY=1
12 changes: 7 additions & 5 deletions dagger.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "vscode-runme",
"engineVersion": "v0.15.3",
"sdk": "typescript",
"engineVersion": "v0.18.2",
"sdk": {
"source": "typescript"
},
"dependencies": [
{
"name": "golang",
"source": "github.com/purpleclay/daggerverse/golang@7e83bccc350fa981e975ac0c8619f92a1b729958",
"pin": "7e83bccc350fa981e975ac0c8619f92a1b729958"
"name": "runme",
"source": "github.com/runmedev/runme",
"pin": "15b94571d4dc35688de18d276b0d3162a2177c34"
}
],
"source": "dagger"
Expand Down
50 changes: 29 additions & 21 deletions dagger/notebook/shell.dag
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
cwd: ../..
runme:
id: 01JMMSSHXM7N70W4KCJ5XGEE2A
version: v3
Expand All @@ -10,38 +11,45 @@ terminalRows: 20

Build notebook piplines using the brand new 🔥 dagger shell. New files with the `.dag` extension will default run via `dagger shell`.

## Let's go
Initialize the VscodeRunme Dagger module.

```sh {"name":"VscodeRunmeModule","terminalRows":"10"}
### Exported in runme.dev as VscodeRunmeModule
. --source .
```

We need some upstream artifacts. First, compile the Runme kernel binary.
Let'see what the module's got to offer.

```sh {"interpreter":"zsh","name":"GitHubToken","promptEnv":"never","terminalRows":"2"}
### Exported in runme.dev as GitHubToken
export GITHUB_TOKEN=$(gh auth token)
```sh {"terminalRows":"18"}
VscodeRunmeModule | .help
```

```sh {"id":"01JMMSSHXM7N70W4KCHTX92MHE","name":"KernelBinary"}
### Exported in runme.dev as KernelBinary
github.com/runmedev/runme | binary
## Let's go

We need some upstream artifacts. First, let's grab the pre-built binary for the Runme kernel.

```sh {"terminalRows":"13"}
github.com/runmedev/runme | release --version latest | entries
```

Then, grab the presetup.sh script to provision the build container.
Specifically the one for Linux x64/AMD64.

```sh {"id":"01JMMSSHXM7N70W4KCHY04QVSE","name":"Presetup","terminalRows":"14"}
### Exported in runme.dev as Presetup
git https://github.com/runmedev/vscode-runme |
head |
tree |
file dagger/scripts/presetup.sh
```sh {"id":"01JMMSSHXM7N70W4KCHTX92MHE","name":"KernelLinux","terminalRows":"13"}
### Exported in runme.dev as KernelLinux
github.com/runmedev/runme | release-files --version latest "linux/amd64"
```

## Build the Runme VS Code Extension

Let's tie together above's artifacts via their respective cell names to build the Runme VS Code extension.

```sh {"id":"01JMMSSHXM7N70W4KCJ1N0DVXG","name":"Extension","terminalRows":"26"}
### Exported in runme.dev as Extension
github.com/runmedev/vscode-runme |
with-remote github.com/runmedev/vscode-runme main |
with-container $(KernelBinary) $(Presetup) |
build-extension GITHUB_TOKEN
```sh {"id":"01JMMSSHXM7N70W4KCJ1N0DVXG","name":"ExtensionLinux","terminalRows":"17"}
### Exported in runme.dev as ExtensionLinux
VscodeRunmeModule | build $(KernelLinux)
```

Export the extension to a VSIX file.

```sh
ExtensionLinux | export "runme-extension-linux-amd64.vsix"
```
Loading