Cleanup block device terminology for new API
This commit is contained in:
parent
b6f5736784
commit
65c0fbf448
2 changed files with 8 additions and 6 deletions
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
|
@ -181,7 +181,7 @@ jobs:
|
||||||
- name: Adjust index.html
|
- name: Adjust index.html
|
||||||
run: |
|
run: |
|
||||||
sudo sed -i 's#IMAGE_URL#"${{ env.IMAGE_NAME }}"#g' ${{ env.DEPLOY_DIR }}index.html
|
sudo sed -i 's#IMAGE_URL#"${{ env.IMAGE_NAME }}"#g' ${{ env.DEPLOY_DIR }}index.html
|
||||||
sudo sed -i 's#DEVICE_TYPE#"split"#g' ${{ env.DEPLOY_DIR }}index.html
|
sudo sed -i 's#DEVICE_TYPE#"github"#g' ${{ env.DEPLOY_DIR }}index.html
|
||||||
sudo sed -i 's#CMD#${{ env.CMD }}#g' ${{ env.DEPLOY_DIR }}index.html
|
sudo sed -i 's#CMD#${{ env.CMD }}#g' ${{ env.DEPLOY_DIR }}index.html
|
||||||
sudo sed -i 's#ARGS#${{ env.ARGS }}#g' ${{ env.DEPLOY_DIR }}index.html
|
sudo sed -i 's#ARGS#${{ env.ARGS }}#g' ${{ env.DEPLOY_DIR }}index.html
|
||||||
sudo sed -i 's#ENV#${{ env.ENV }}#g' ${{ env.DEPLOY_DIR }}index.html
|
sudo sed -i 's#ENV#${{ env.ENV }}#g' ${{ env.DEPLOY_DIR }}index.html
|
||||||
|
|
12
index.html
12
index.html
|
@ -271,12 +271,14 @@ __ __ _ __ ____ __
|
||||||
var env = ENV;
|
var env = ENV;
|
||||||
var cwd = CWD;
|
var cwd = CWD;
|
||||||
var device_type = DEVICE_TYPE;
|
var device_type = DEVICE_TYPE;
|
||||||
|
var image_url = IMAGE_URL;
|
||||||
// Reasonable defaults for local deployments
|
// Reasonable defaults for local deployments
|
||||||
// var cmd = "/bin/bash";
|
// var cmd = "/bin/bash";
|
||||||
// var args = ["--login"];
|
// var args = ["--login"];
|
||||||
// var env = ["HOME=/home/user", "TERM=xterm", "USER=user", "SHELL=/bin/bash", "EDITOR=vim", "LANG=en_US.UTF-8", "LC_ALL=C"];
|
// var env = ["HOME=/home/user", "TERM=xterm", "USER=user", "SHELL=/bin/bash", "EDITOR=vim", "LANG=en_US.UTF-8", "LC_ALL=C"];
|
||||||
// var cwd = "/home/user";
|
// var cwd = "/home/user";
|
||||||
// var device_type = "bytes";
|
// var device_type = "bytes";
|
||||||
|
// var image_url = "/your_local_image.ext2";
|
||||||
const structure = {
|
const structure = {
|
||||||
cmd: cmd,
|
cmd: cmd,
|
||||||
args: args,
|
args: args,
|
||||||
|
@ -342,14 +344,14 @@ __ __ _ __ ____ __
|
||||||
var blockDevice;
|
var blockDevice;
|
||||||
switch (device_type)
|
switch (device_type)
|
||||||
{
|
{
|
||||||
case "block":
|
case "cloud":
|
||||||
blockDevice = await CheerpX.CloudDevice.create(IMAGE_URL);
|
blockDevice = await CheerpX.CloudDevice.create(image_url);
|
||||||
break;
|
break;
|
||||||
case "bytes":
|
case "bytes":
|
||||||
blockDevice = await CheerpX.HttpBytesDevice.create(IMAGE_URL);
|
blockDevice = await CheerpX.HttpBytesDevice.create(image_url);
|
||||||
break;
|
break;
|
||||||
case "split":
|
case "github":
|
||||||
blockDevice = await CheerpX.GitHubDevice.create(IMAGE_URL);
|
blockDevice = await CheerpX.GitHubDevice.create(image_url);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unrecognized device type");
|
console.log("Unrecognized device type");
|
||||||
|
|
Loading…
Reference in a new issue