From db5600cf787aeb383545ff5d5ba87da22170aa86 Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Fri, 27 May 2022 18:02:12 +0900 Subject: [PATCH 1/3] Add .devcontainer/devcontainer.json --- .devcontainer/devcontainer.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..bb965e0 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,14 @@ +{ + "customizations": { + "codespaces": { + "repositories": { + "movabletype/*": { + "permissions": "write-all" + } + } + } + }, + "features": { + "docker-in-docker": "latest" + } +} From b22920e7776707a199abb422b91419ccea9a9b26 Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Fri, 27 May 2022 10:09:11 +0000 Subject: [PATCH 2/3] Add postCreateCommand. --- .devcontainer/devcontainer.json | 10 +++++++--- .devcontainer/post-create.sh | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100755 .devcontainer/post-create.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bb965e0..e8625f7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,10 @@ { + // "image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu", + // "features": { + // "docker-in-docker": "latest" + // }, + // "remoteUser": "vscode", + "postCreateCommand": ".devcontainer/post-create.sh", "customizations": { "codespaces": { "repositories": { @@ -8,7 +14,5 @@ } } }, - "features": { - "docker-in-docker": "latest" - } + "extensions": ["mortenhenriksen.perl-debug", "d9705996.perl-toolbox"] } diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000..ccbb623 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -xe + +sudo apt update +sudo apt install -y make git zip libio-socket-ssl-perl +sudo apt clean From bd0570ab92842bd2117f3414a53a2be6f5e1fdfd Mon Sep 17 00:00:00 2001 From: Taku Amano Date: Sat, 28 May 2022 08:52:02 +0900 Subject: [PATCH 3/3] Use https://github.com/ for repository base URL. --- bin/setup-environment | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/setup-environment b/bin/setup-environment index e3817be..b7b62a0 100755 --- a/bin/setup-environment +++ b/bin/setup-environment @@ -58,6 +58,9 @@ sub handle_recipe { my @volumes; for my $k ( keys %$data ) { my $repo = $data->{$k}{location}; + if (($ENV{CODESPACES} || '') eq 'true') { + $repo =~ s{^git\@github.com:}{https://github.com/}; + } my $dest_dir = $data->{$k}{directory} || do { "$repo_base_dir/@{[basename($repo)]}"; };