From 3d9fc9927baf98c75ce3e15489ffd90cfed6c02b Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Sun, 5 Jan 2025 11:21:13 +0100 Subject: [PATCH 1/5] Add devcontainer.json --- .devcontainer/devcontainer.json | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..93e1953 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,38 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "Ubuntu", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:jammy", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": [ + "mono-complete" + ] + }, + "ghcr.io/devcontainers-extra/features/gh-release:1": { + "repo": "oscript-library/ovm" + } + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions":[ + "1c-syntax.language-1c-bsl", + "EvilBeaver.oscript-debug" + ] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From bc521130bae7461a9ba729b14f7906438ba5ac61 Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Sun, 5 Jan 2025 11:23:54 +0100 Subject: [PATCH 2/5] Update devcontainer.json to specify version and asset for gh-release feature --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 93e1953..2d57bc0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,7 +13,10 @@ ] }, "ghcr.io/devcontainers-extra/features/gh-release:1": { - "repo": "oscript-library/ovm" + "repo": "oscript-library/ovm", + "version": "latest", + "asset": "ovm.exe", + "binLocation": "." } }, From db61abca1de61e84fdd38e3ee0a871c6990c321a Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Sun, 5 Jan 2025 11:26:57 +0100 Subject: [PATCH 3/5] Update binLocation in devcontainer.json to point to the correct workspace directory --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2d57bc0..2380ba8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,7 +16,7 @@ "repo": "oscript-library/ovm", "version": "latest", "asset": "ovm.exe", - "binLocation": "." + "binLocation": "/workspace/autumn" } }, From 1f163d83179afabcf23b72597328a1b9ba5f4f3d Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Sun, 5 Jan 2025 11:28:22 +0100 Subject: [PATCH 4/5] Add binaryNames field to devcontainer.json for ovm.exe --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2380ba8..3882ed8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,6 +16,7 @@ "repo": "oscript-library/ovm", "version": "latest", "asset": "ovm.exe", + "binaryNames": "ovm.exe", "binLocation": "/workspace/autumn" } }, From 02bb453f2965e2b503b429f18260ae23d3844170 Mon Sep 17 00:00:00 2001 From: Nikita Fedkin Date: Mon, 6 Jan 2025 19:48:29 +0000 Subject: [PATCH 5/5] Working setup --- .devcontainer/devcontainer.json | 25 ++++++++++++++++++++----- .devcontainer/postCreateCommand.sh | 15 +++++++++++++++ 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100755 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3882ed8..8a7f649 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -15,9 +15,10 @@ "ghcr.io/devcontainers-extra/features/gh-release:1": { "repo": "oscript-library/ovm", "version": "latest", - "asset": "ovm.exe", "binaryNames": "ovm.exe", - "binLocation": "/workspace/autumn" + "additionalFlags": [ + "--no-filter-assets-by-platform" + ] } }, @@ -25,16 +26,30 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "uname -a", + "postCreateCommand": "bash .devcontainer/postCreateCommand.sh", + + "postAttachCommand": "source /home/vscode/.profile", // Configure tool-specific properties. "customizations": { "vscode": { "extensions":[ "1c-syntax.language-1c-bsl", - "EvilBeaver.oscript-debug" - ] + "EvilBeaver.oscript-debug", + "zhuangtongfa.material-theme", + "yzhang.markdown-all-in-one", + "GitHub.copilot", + "GitHub.copilot-chat" + ], + + "settings": { + "language-1c-bsl.languageServerReleaseChannel": "prerelease" + } } + }, + + "containerEnv": { + "LC_ALL": "en_US.UTF-8" } // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 0000000..5dfa8f2 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -eux + +mkdir -p /home/vscode/.local/bin +echo "mono /usr/local/bin/ovm.exe \"\$@\"" > /home/vscode/.local/bin/ovm +chmod +x /home/vscode/.local/bin/ovm + +ovm use --install dev + +source /home/vscode/.profile + +opm install opm +opm install oscript-config +opm install -l