Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gopinath-langote/1build
Frictionless way of managing project-specific commands
https://github.com/gopinath-langote/1build
awesome-go bash command-line developer-tools go golang productivity
Last synced: 14 days ago
JSON representation
Frictionless way of managing project-specific commands
- Host: GitHub
- URL: https://github.com/gopinath-langote/1build
- Owner: gopinath-langote
- License: mit
- Created: 2019-04-23T17:05:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-05T04:59:30.000Z (over 1 year ago)
- Last Synced: 2024-09-30T22:11:13.082Z (about 1 month ago)
- Topics: awesome-go, bash, command-line, developer-tools, go, golang, productivity
- Language: Go
- Homepage: https://1build.gitbook.io
- Size: 530 KB
- Stars: 226
- Watchers: 6
- Forks: 30
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-go - 1build - Command line tool to frictionlessly manage project-specific commands. (Build Automation)
- awesome-Char - 1build - Command line tool to frictionlessly manage project-specific commands. (Command Line / Standard CLI)
- awesome-go - 1build - Command line tool to frictionlessly manage project-specific commands. (Command Line / Standard CLI)
- fucking-awesome-go - 1build - Command line tool to frictionlessly manage project-specific commands. (Build Automation)
- awesome-go - 1build - Command line tool to frictionlessly manage project-specific commands. (Build Automation)
- awesome-go - 1build - Command line tool to frictionlessly manage project-specific commands. (Build Automation)
- awesome-go-extra - 1build - specific commands|176|30|32|2019-04-23T17:05:38Z|2022-06-30T04:18:29Z| (Build Automation)
- awesome-go-cn - 1build
- awesome-go-with-stars - 1build - Command line tool to frictionlessly manage project-specific commands. (Build Automation)
- awesome-go-plus - 1build - Command line tool to frictionlessly manage project-specific commands. (Build Automation)
- awesome-go-plus - 1build - Command line tool to frictionlessly manage project-specific commands. ![stars](https://img.shields.io/badge/stars-227-blue) ![forks](https://img.shields.io/badge/forks-30-blue) (Build Automation)
README
1build is an automation tool used for research and development projects that arms you with the convenience to configure project-local command line aliases – and then
run the commands quickly and easily. It is particularly helpful when you deal with multiple projects and switch between
them all the time. It is often the fact that different projects use different build tools and have different environment
requirements – and then switching from one project to another is becoming increasingly cumbersome. That is where 1build comes
into play.With 1build you can create simple and easily memorable command aliases for commonly used project commands such as build,
test, run or anything else. These aliases will have a project-local scope which means that they will be accessible only
within the project directory. This way you can unify all your projects to build with the same simple command disregarding
of what build tool they use. It will remove the hassle of remembering all those commands improving the mental focus for
the things that actually matter.## Install
### Homebrew
```console
brew install gopinath-langote/one-build/one-build
```### Manual
1. Download and install binary from [the latest release](https://github.com/gopinath-langote/1build/releases/latest)
2. Recommended: add `1build` executable to your `$PATH`.## Usage
### Configuration
- Create `1build.yaml` configuration file by
```console
1build init --name
```- Edit file according to project command list, Example of `1build.yaml` for node project:
```yaml
project: Sample Web App
commands:
- build: npm run build
- test: npm run test
```### Running 1build for the above sample project
- building the project
```console
1build build
```- fix the coding guidelines lint and run tests (executing more than one commands at once)
```console
1build lint test
```### Set new or update existing configuration
- Set new command configuration for `lint` to `"eslint server.js"`
```console
1build set lint "eslint server.js"
```
### Remove/Unset existing configuration- Unset command configuration for `lint`
```console
1build unset lint
```- To unset multiple commands at once
```console
1build unset lint test build
```### Using `before` and `after` commands
Consider that your project requires some environment variables to set before running any
commands and you want to clean up those after running commands. It is a headache to always
remember to set those environment variables. What you want is to set env variables automatically
when you run the command in the project and remove those when the command is complete.
Another example – a project requires `Docker` to be up
and running or you need to clean up the database after running a test harness.This is where `before` & `after` commands are useful. These commands are both optional –
you can use one of them, both or neither.#### Examples
1. Setting env variables and cleaning those up
```console
1build set before 'export VARNAME="my value"'
1build set after "unset VARNAME"
```
Configuration with before and after setup
```yaml
project: Sample Web App
before: export VARNAME="my value"
after: unset VARNAME
commands:
- build: npm run build
```2. Ensure that `Docker` is up and running
```console
1build set before "./docker_run.sh"
```3. Clean up database after some commands
```console
1build set after "./clean_database.sh"
```4. Remove `before` and `after` commands
```console
1build unset before after
```### Using `--quiet` or `-q` flag
Sometimes you choose to not see all logs/output of your command and just see success or failure as the outcome.
So using `--quiet` or `-q` flag to 1build command execution will result in just executing the command
but not showing the entire output of it, only shows SUCCESS/FAILURE as result of command execution.
```console
1build lint test --quiet
```
OR
```console
1build lint test -q
```See `1build --help` for command usages.
## Contributing
Please read [CONTRIBUTING.md](https://github.com/gopinath-langote/1build/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
We use [Semantic Versioning](http://semver.org/) for all our releases. For the versions available, see the [tags on this repository](https://github.com/gopinath-langote/1build/tags).
## Changelog
All notable changes to this project in each release will be documented in [Releases Page](https://github.com/gopinath-langote/1build/releases/).The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Contributors
## Sponsors