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.
- Host: GitHub
- URL: https://github.com/asimihsan/version-enforcer
- Owner: asimihsan
- License: apache-2.0
- Created: 2023-02-07T21:39:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-08T00:21:55.000Z (over 2 years ago)
- Last Synced: 2025-01-29T04:38:33.160Z (5 months ago)
- Language: Go
- Size: 14.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
version-enforcerEnforce 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 --helpEnforce 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.