Skip to content

Commit

Permalink
Merge pull request #14 from Pandademic/add-commmand-testing
Browse files Browse the repository at this point in the history
Backend change to install with separate command
  • Loading branch information
Pandademic authored Sep 1, 2021
2 parents 1762c14 + ba4a337 commit 03d0fa0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/2.6ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
#bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle lock --add-platform x86_64-linux
- run: bundle install
#- run: ruby core/latte.rb help
- run: ruby core/latte.rb installImg 'https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2017/11/22130127/Pug-puppy-standing-in-profile-on-a-white-background.jpg'
- run: ruby core/latte.rb install brew-source
- run: ruby core/latte.rb install brew
1 change: 1 addition & 0 deletions .github/workflows/2.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ jobs:
#- run: ruby core/latte.rb help
- run: ruby core/latte.rb installImg 'https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2017/11/22130127/Pug-puppy-standing-in-profile-on-a-white-background.jpg'
- run: ruby core/latte.rb install brew-source
- run: ruby core/latte.rb install brew

1 change: 1 addition & 0 deletions .github/workflows/3.0ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ jobs:
#- run: ruby core/latte.rb help
- run: ruby core/latte.rb installImg 'https://s3.amazonaws.com/cdn-origin-etr.akc.org/wp-content/uploads/2017/11/22130127/Pug-puppy-standing-in-profile-on-a-white-background.jpg'
- run: ruby core/latte.rb install brew-source
- run: ruby core/latte.rb install brew


28 changes: 17 additions & 11 deletions core/latte.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@
# module to download Packages
module Pkg
def self.findPkg(query)
@query = query
puts "Getting #{@query}"
$query = @query
$query = query
puts "Getting #{$query}"
Pkg.getPkgfile
end

def self.getPkgfile
ensure
$pfr = URI.open("https://raw.githubusercontent.com/Pandademic/Latte/master/packages/#{$query}.ini").read
$packageFileURL = "https://raw.githubusercontent.com/Pandademic/Latte/master/packages/#{$query}.ini"
puts "Package file:#{$pfr}"
system("wget #{$packageFileURL} --directory-prefix=/tmp/")
pfr = URI.open("https://raw.githubusercontent.com/Pandademic/Latte/master/packages/#{$query}.ini").read
packageFileURL = "https://raw.githubusercontent.com/Pandademic/Latte/master/packages/#{$query}.ini"
puts "Package file:#{pfr}"
system("wget #{packageFileURL} --directory-prefix=/tmp/")
puts 'package file download complete'
Pkg.downloadLatest
# TODO: implement begin.resuce,else,ensure,end
Expand All @@ -27,11 +26,18 @@ def self.getPkgfile
def self.downloadLatest
file = IniFile.load("/tmp/#{$query}.ini")
puts 'loaded file'
$pkgdata = file['package']
pkgdata = file['package']
puts 'Release URL:'
puts $pkgdata['Release']
@RURL = $pkgdata['Release']
system("wget #{@RURL}")
puts pkgdata['Release']
zipsupport = pkgdata['Zip']
if zipsupport == true
# TODO: #13 add zipsupport to docs (package-example.ini)
@RURL = pkgdata['Release']
system("wget #{@RURL}")
else
@ISC = pkgdata['Isc'] # install command
system(@ISC.to_s)
end
end
end
# FileUtils.touch('info.log')
Expand Down
5 changes: 2 additions & 3 deletions packages/brew.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Version= 3.2.9
Author= "Homebrew"
License= "BSD 2-Clause Simplified License"
Source="https://github.com/Homebrew/brew/"
Release="https://github.com/Homebrew/brew/archive/refs/tags/3.2.9.zip"
Zip=true
Isc=true
#Release="https://github.com/Homebrew/brew/archive/refs/tags/3.2.9.zip"
Zip=false
InstallCommand='/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"'

0 comments on commit 03d0fa0

Please sign in to comment.