Skip to content

Commit

Permalink
Merge branch 'master' into feat/compute-dependency-hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
elldritch committed Jun 6, 2018
2 parents e704dc6 + 9b8818f commit e4a5aec
Show file tree
Hide file tree
Showing 7 changed files with 841 additions and 451 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build: $(BIN)/fossa

$(BIN)/fossa: $(GO_BINDATA)
mkdir -p $$(dirname $@)
$< -pkg bindata -o builders/bindata/bindata.go builders/python/bindata/pipdeptree.py
$< -pkg bindata -o builders/python/bindata/bindata.go builders/python/bindata/pipdeptree.py
go build -o $@ $(LDFLAGS) github.com/fossas/fossa-cli/cmd/fossa

$(PREFIX)/fossa: $(BIN)/fossa
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@

## Installation

Install the latest [Github Release](releases/) using `curl`:
Install on **MacOS (Darwin) or Linux amd6** using `curl`:
```bash
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
```

We support Windows, MacOS (Darwin), and Linux amd64 machines.
Install on **Windows** using `cmd.exe`:
```powershell
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/fossas/fossa-cli/master/install.ps1'))"
```

These commands will execute scripts to fetch and install the latest [Github Release](releases/).

## Quick Start

Expand Down
239 changes: 0 additions & 239 deletions builders/bindata/bindata.go

This file was deleted.

208 changes: 0 additions & 208 deletions builders/common.go

This file was deleted.

49 changes: 49 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#Requires -Version 5

<#
.SYNOPSIS
Executes the latest available FOSSA release from GitHub.
.PARAMETER ApiKey
The FOSSA API key to be used for the current Powershell Session.
.PARAMETER TempDir
The directory used for FOSSA download and extraction.
#>

[CmdletBinding()]
Param(
$TempDir = $env:TEMP,
[Parameter(Mandatory=$true)]
$ApiKey
)

$ErrorActionPreference = "Stop"

$github = "https://github.com"
$latestUri = "$github/fossas/fossa-cli/releases/latest"
$extractDir = "$env:ALLUSERSPROFILE\fossa-cli"

[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

$releasePage = Invoke-RestMethod $latestUri

if ($releasePage -inotmatch 'href=\"(.*?releases\/download\/.*?windows.*?)\"')
{
throw "Did not find latest Windows release at $latestUri"
}

$downloadUri = "$github/$($Matches[1])"
Write-Verbose "Download from: $downloadUri"

$zipFile = "$TempDir\fossa-cli.zip"

(New-Object System.Net.WebClient).DownloadFile($downloadUri, $zipFile)

Expand-Archive -Path $zipFile -DestinationPath $extractDir -Force

$ErrorActionPreference = "Continue"

$env:FOSSA_API_KEY = $ApiKey

& "$TempDir\fossa-cli\fossa.exe"
2 changes: 1 addition & 1 deletion testdata/fixtures/golang/govendor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vendor
vendor/*
!vendor/vendor.json

0 comments on commit e4a5aec

Please sign in to comment.