From bc36365ef95574a0205229a5ad2f896997c22c07 Mon Sep 17 00:00:00 2001 From: Drew Short Date: Sat, 13 Jan 2018 01:21:33 -0600 Subject: [PATCH] Working on getting update to work --- .gitlab-ci.yml | 2 ++ src/spm/spm.lua | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 13007c5..b533082 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,6 +46,7 @@ development: - eval `ssh-agent -s` - ssh-add <(echo "$SSH_DEPLOY_KEY") - pushd ./dist + - find * -type f -exec sed -i -e 's@{ENV}@'"$ENVIRONMENT"'@g' {} \; - find * -type f -exec sed -i -e 's@{URL_BASE}@'"$DOWNLOAD_URL_BASE"'@g' {} \; - popd - rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress dist/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY @@ -70,6 +71,7 @@ production: - eval `ssh-agent -s` - ssh-add <(echo "$SSH_DEPLOY_KEY") - pushd ./dist + - find * -type f -exec sed -i -e 's@{ENV}@'"$ENVIRONMENT"'@g' {} \; - find * -type f -exec sed -i -e 's@{URL_BASE}@'"$DOWNLOAD_URL_BASE"'@g' {} \; - popd - rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress dist/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY diff --git a/src/spm/spm.lua b/src/spm/spm.lua index 6361097..0805474 100644 --- a/src/spm/spm.lua +++ b/src/spm/spm.lua @@ -109,7 +109,7 @@ local function readFromFile(fNum) end if not fs.exists(fs.path(path)) then fs.makeDirectory(fs.path(path)) - end/o + end if not fs.exists(path) then return { -1 } end @@ -213,7 +213,7 @@ local function printPackages(tPacks) end term.clear() local xRes, yRes = gpu.getResolution() - print("--SPM Package list--") + print("--SPM {ENV} Package list--") local xCur, yCur = term.getCursor() for _, j in ipairs(tPacks) do term.write(j .. "\n") @@ -223,7 +223,7 @@ local function printPackages(tPacks) local event = event.pull("key_down") if event then term.clear() - print("--SPM Package list--") + print("--SPM {ENV} Package list--") xCur, yCur = term.getCursor() end end