Browse Source

Moving domains

environments/production/deployments/39
Drew Short 7 years ago
parent
commit
38a7bbf698
  1. 8
      .gitlab-ci.yml
  2. 16
      src/spm/spm.moon

8
.gitlab-ci.yml

@ -38,8 +38,8 @@ development:
DEPLOY_HOST: "sothr.com" DEPLOY_HOST: "sothr.com"
DEPLOY_PORT: "9140" DEPLOY_PORT: "9140"
ENVIRONMENT: "Development" ENVIRONMENT: "Development"
TARGET_DIRECTORY: "~/download_dir/oc/development"
DOWNLOAD_URL_BASE: "https://sothr.com/download/oc/development"
TARGET_DIRECTORY: "~/opencomputers.sothr.com/development"
DOWNLOAD_URL_BASE: "https://opencomputers.sothr.com/development"
MINIFIED_SOURCE: "false" MINIFIED_SOURCE: "false"
script: script:
- echo "Deployment To Development Starting..." - echo "Deployment To Development Starting..."
@ -65,8 +65,8 @@ production:
DEPLOY_HOST: "sothr.com" DEPLOY_HOST: "sothr.com"
DEPLOY_PORT: "9140" DEPLOY_PORT: "9140"
ENVIRONMENT: "Release" ENVIRONMENT: "Release"
TARGET_DIRECTORY: "~/download_dir/oc/release"
DOWNLOAD_URL_BASE: "https://sothr.com/download/oc/release"
TARGET_DIRECTORY: "~/opencomputers.sothr.com/release"
DOWNLOAD_URL_BASE: "https://https://opencomputers.sothr.com/release"
MINIFIED_SOURCE: "true" MINIFIED_SOURCE: "true"
script: script:
- echo "Deployment To Production Starting..." - echo "Deployment To Production Starting..."

16
src/spm/spm.moon

@ -39,26 +39,26 @@ printUsage = ->
-- Make an internet http/s request for data -- Make an internet http/s request for data
getContent = (url) -> getContent = (url) ->
sContent = ""
content = ""
result, response = pcall(internet.request, url) result, response = pcall(internet.request, url)
if not result if not result
return nil return nil
for chunk in response for chunk in response
sContent = sContent .. chunk
content = content .. chunk
return sContent
return content
-- Request repository information -- Request repository information
getRepos = ->
success, sRepos = pcall(getContent, repoLocationConfig)
getRepositories = ->
success, raw_repositories = pcall(getContent, repoLocationConfig)
if not success if not success
io.stderr\write("Could not connect to the Internet. Please ensure you have an Internet connection.") io.stderr\write("Could not connect to the Internet. Please ensure you have an Internet connection.")
return -1 return -1
return serial.unserialize(sRepos)
return serial.unserialize(raw_repositories)
-- Get Packages for src -- Get Packages for src
getPackages = (src) -> getPackages = (src) ->
@ -136,7 +136,7 @@ listPackages = (filter) ->
packageTable = {} packageTable = {}
print("Receiving Package list...") print("Receiving Package list...")
if not options.i if not options.i
success, repositories = pcall(getRepos)
success, repositories = pcall(getRepositories)
if not success or repositories == -1 if not success or repositories == -1
io.stderr\write("Unable to connect to the Internet.\n") io.stderr\write("Unable to connect to the Internet.\n")
@ -205,7 +205,7 @@ printPackages = (packages) ->
xCur, yCur = term.getCursor() xCur, yCur = term.getCursor()
getInformation = (requestedPackage) -> getInformation = (requestedPackage) ->
success, repositories = pcall(getRepos)
success, repositories = pcall(getRepositories)
if not success or repositories == -1 if not success or repositories == -1
io.stderr\write("Unable to connect to the Internet.\n") io.stderr\write("Unable to connect to the Internet.\n")

Loading…
Cancel
Save