Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
docs and binary name change (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlav authored Jun 3, 2020
1 parent dd77d61 commit 26c885e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ jobs:
if: ${{ contains(matrix.os, 'windows') }}
run: |
mkdir release
find . -type f -path '*/fossa2/fossa2.exe' -exec mv {} release \;
find . -type f -path '*/fossa/fossa.exe' -exec mv {} release \;
find . -type f -path '*/pathfinder/pathfinder.exe' -exec mv {} release \;
find . -type f -path '*/vpscli/vpscli.exe' -exec mv {} release \;
- name: Find and move binaries (non-windows)
if: ${{ !contains(matrix.os, 'windows') }}
run: |
mkdir release
find . -type f -path '*/fossa2/fossa2' -exec mv {} release \;
find . -type f -path '*/fossa/fossa' -exec mv {} release \;
find . -type f -path '*/pathfinder/pathfinder' -exec mv {} release \;
find . -type f -path '*/vpscli/vpscli' -exec mv {} release \;
Expand Down Expand Up @@ -116,17 +116,17 @@ jobs:
ls -R
chmod +x Linux-binaries/*
zip -j release/fossa2_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip Linux-binaries/fossa2
zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip Linux-binaries/fossa
zip -j release/pathfinder_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip Linux-binaries/pathfinder
zip -j release/vpscli_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip Linux-binaries/vpscli
chmod +x macOS-binaries/*
zip -j release/fossa2_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/fossa2
zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/fossa
zip -j release/pathfinder_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/pathfinder
zip -j release/vpscli_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/vpscli
chmod +x Windows-binaries/*
zip -j release/fossa2_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/fossa2.exe
zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/fossa.exe
zip -j release/pathfinder_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/pathfinder.exe
zip -j release/vpscli_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/vpscli.exe
Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ languages/managers.

```sh
export FOSSA_API_KEY=your-key-goes-here
me@mydesk:~/myproject$ fossa2 analyze
me@mydesk:~/myproject$ fossa analyze
```

If you do not have an API key, please check the [FOSSA Documentation](https://docs.fossa.com/docs/api-reference)
Expand All @@ -17,7 +17,7 @@ for instructions on creating API tokens.

1. [Installation](#installation)
2. [Basic Usage](#basic-usage)
3. [Supported Strategies](#supported-languages)
3. [Supported Languages](#supported-languages)
4. [Contributing](#contributing)

## Installation
Expand All @@ -40,11 +40,12 @@ easier.

The tool requires little-to-no configuration to run on its own.

### Analysis
```sh
export FOSSA_API_KEY=your-key-goes-here
fossa2 analyze
fossa analyze
# OR
fossa2 analyze --fossa-api-key your-key-goes-here
fossa analyze --fossa-api-key your-key-goes-here
```

**NOTE:** *If leaked, your FOSSA API key can grant an attacker access to your FOSSA projects, and should be kept secret. For this reason, we recommend the API key with the environment variable, especially in a shared environment like a CI/CD server.*
Expand All @@ -53,16 +54,25 @@ By default, the program will analyze the current working directory. If you need
to run in a different directory, you can simply pass that directory as an argument.

```sh
fossa2 analyze /path/to/project
fossa analyze /path/to/project
```

The `--output` flag tells the analyzer not to connect to a FOSSA server,
instead printing out the analysis result to the console.

```sh
fossa2 analyze --output
fossa analyze --output
# OR
fossa2 analyze -o
fossa analyze -o
```

### Testing

The fossa cli provides the ability to check if your project has passed its license scan after running analysis. This can be useful if you wish to block a CI pipeline on successful scan results.

Running the following command from the same directory as analysis and with the same API key will fail if the license scan is failing.
```sh
fossa test
```

## Supported Languages
Expand All @@ -88,7 +98,7 @@ In the base directory, run `cabal build`
### Running

```sh
$ cabal run fossa2 -- analyze -o path/to/basedir/
$ cabal run fossa -- analyze -o path/to/basedir/
```

This will produce analysis results on stdout
Expand All @@ -104,3 +114,9 @@ Run the tests:
```
cabal test
```

### Issue Reporting

Issues with the FOSSA CLI itself should be filed through the [Github issue's page](https://github.com/fossas/spectrometer/issues/new). However, if the issue you are seeing is related to the results you see on the FOSSA dashboard, you should contact [email protected].

When filing an issue please record any information required to reproduce the issue you are experiencing so that the development team can help you as quickly as possible. Pictures and detailed information about your project are greatly appreciated!
2 changes: 1 addition & 1 deletion spectrometer.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ library

hs-source-dirs: src

executable fossa2
executable fossa
import: lang
main-is: Main.hs
hs-source-dirs: app/fossa
Expand Down

0 comments on commit 26c885e

Please sign in to comment.