An open API service indexing awesome lists of open source software.

https://github.com/asimihsan/version-enforcer

Enforce software version compliance.
https://github.com/asimihsan/version-enforcer

Last synced: 3 months ago
JSON representation

Enforce software version compliance.

Awesome Lists containing this project

README

        


version-enforcer

Enforce software version compliance.


Installation, example
Usage
Configuration
TODO
License

`version-enforcer` is a tool that enforces software version compliance. It is a
simple tool that can be used in CI pipelines and developer hosts to ensure that
the correct versions of software are installed.

## Installation, example

This will install `version-enforcer` to your `GOPATH`, which by default is `~/go`.

```sh
go install -v github.com/asimihsan/[email protected]
```

Then create a config file:

```sh
tee version-enforcer.hcl < /dev/null
binary "git" {
version = "~2"
}
binary "make" {
version = "^4.2.1"
}
EOF
```

Finally, run `version-enforcer`:

```sh
version-enforcer --config version-enforcer.hcl
```

## Usage

```sh
$ version-enforcer --help

Enforce tool versions

Usage:
enforce --config [flags]

Flags:
--config string config file (e.g. version-enforcer.hcl)
-h, --help help for enforce
-v, --verbose verbose output
```

For example, you could run:

```
$ version-enforcer --config version-enforcer.hcl
```

## Configuration

Here is an example configuration file that specifies that

- `make` must be exactly `4.2.1`, and
- `git` must be between `>= 2.0.0` and `< 3.0.0`.

```hcl
binary "git" {
version = "~2"
}

binary "make" {
version = "^4.2.1"
}
```

The requirement specifications follow
[https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html).

## TODO

- [ ] Add support for `library` requirements.
- [ ] Output binary path in error messages.

## License

This project is licensed under the Apache License, Version 2.0. See
[LICENSE](LICENSE) for details.