Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build improvments #179

Merged
merged 19 commits into from
Mar 12, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README
  • Loading branch information
Cosmin Cojocar authored and ccojocar committed Mar 11, 2018
commit 0d274ec69d315aaefbf58e199e8c05d0900fb9a8
39 changes: 30 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,31 @@ $ gas -fmt=json -out=results.json *.go
```
### Development

#### Build


```
make
```

#### Tests

```
make tests
```

#### Release Build

Gas can be released as follows:

```bash
# Prepare the build variables
export VERSION=2.0.0
export GIT_TAG=$(git describe --always --tags)
export BUILD_DATE=$(date +%Y-%m-%d)

# Perform a release build
go build -ldflags "-X main.Version=${VERSION} -X main.GitTag=${GIT_TAG} -X main.BuildDate=${BUILD_DATE}" ./cmd/gas/
make release VERSION=2.0.0
```

The build information is now displayed in the usage text.
The released version of the tool is available in the `build` folder. The build information should be displayed in the usage text.

```
gas -h
./build/gas-2.0.0-linux-amd64 -h

GAS - Go AST Scanner

Expand All @@ -146,6 +153,20 @@ BUILD DATE: 2018-02-21

```

#### Docker image

You can execute a release and build the docker image as follows:

```
make image VERSION=2.0.0
```

Now you can run the gas tool in a container against your local workspace:

```
docker run -it -v <YOUR LOCAL WORKSPACE>:/workspace gas /workspace
```

#### Generate TLS rule

The configuration of TLS rule can be generated from [Mozilla's TLS ciphers recommendation](https://statics.tls.security.mozilla.org/server-side-tls-conf.json).
Expand Down