mirror of
https://github.com/swift-server/swift-devcontainer-template.git
synced 2026-05-03 07:12:26 +00:00
9d11e1034a
* Build devcontainer from features * Fix lldb.library setting * Remove Node.js comments * Remove swift 4.2 * Update README * Remove table from README * Add test script * comment
20 lines
779 B
Bash
Executable File
20 lines
779 B
Bash
Executable File
#!/bin/sh
|
|
# This script requires the devcontainer tool for publishing. You can install it with
|
|
# npm install -g @devcontainers/cli
|
|
# More details can be found here https://github.com/devcontainers/cli#try-it-out
|
|
#
|
|
# The script currently requires you to edit the devcontainer.json to replace the ${templateOption:imageVariant}
|
|
# with the swift version number you are testing with
|
|
template_id=swift
|
|
set -e
|
|
|
|
# Build container
|
|
echo "Building dev container"
|
|
id_label="test-container=${template_id}"
|
|
devcontainer up --id-label ${id_label} --workspace-folder "src/${template_id}/"
|
|
|
|
# Test swift runs
|
|
devcontainer exec --workspace-folder "src/${template_id}/" --id-label ${id_label} /bin/sh -c 'swift --version'
|
|
|
|
# Clean up
|
|
docker rm -f $(docker container ls -f "label=${id_label}" -q) |