ProductPromotion
Logo

Go.Lang

made by https://0x3d.site

GitHub - gopinath-langote/1build: Frictionless way of managing project-specific commands
Frictionless way of managing project-specific commands - gopinath-langote/1build
Visit Site

GitHub - gopinath-langote/1build: Frictionless way of managing project-specific commands

GitHub - gopinath-langote/1build: Frictionless way of managing project-specific commands

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

brew install gopinath-langote/one-build/one-build

Manual

  1. Download and install binary from the latest release
  2. Recommended: add 1build executable to your $PATH.

Usage

Configuration

  • Create 1build.yaml configuration file by

    1build init --name <your_project_name>
    
  • Edit file according to project command list, Example of 1build.yaml for node project:

    project: Sample Web App
    commands:
      - build: npm run build
      - test: npm run test
    

Running 1build for the above sample project

  • building the project
  1build build
  • fix the coding guidelines lint and run tests (executing more than one commands at once)
  1build lint test

Set new or update existing configuration

  • Set new command configuration for lint to "eslint server.js"
   1build set lint "eslint server.js"

Remove/Unset existing configuration

  • Unset command configuration for lint
   1build unset lint
  • To unset multiple commands at once
  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

    1build set before 'export VARNAME="my value"'
    1build set after "unset VARNAME"
    

    Configuration with before and after setup

    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

    1build set before "./docker_run.sh"
    
  3. Clean up database after some commands

    1build set after "./clean_database.sh"
    
  4. Remove before and after commands

    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.

  1build lint test --quiet

OR

  1build lint test -q

See 1build --help for command usages.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Semantic Versioning for all our releases. For the versions available, see the tags on this repository.

Changelog

All notable changes to this project in each release will be documented in Releases Page.

The format is based on Keep a Changelog.

License

This project is licensed under the MIT License - see the LICENSE file for details

Contributors

Sponsors

Articles
to learn more about the golang concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about GoLang.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory