Frictionless way of managing project-specific commands.
Project description
1build is an automation tool 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
pip install 1build
or
pip3 install 1build
Usage
Configuration
-
create project configuration file in the project folder with name
1build.yaml
-
Example of
1build.yaml
for JVM maven project:project: Sample JVM Project Name commands: - build: mvn clean package - lint: mvn antrun:run@ktlint-format - test: mvn clean test
Running 1build for the above sample project:
-
building the project
1build build
-
fix the coding guidelinges lint and run tests (executing more than one commands at once)
1build lint test
Using before
and after
commands
Consider that your project X
requires Java 11
and the other project requires Java 8
. It is a headache to always
remember to switch the java version. What you want is to switch to Java 11
automatically when you build the project
X
and switch it back to Java 8
when the build 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:
-
Switching to
Java 11
and then back toJava 8
project: Sample JVM Project Name before: ./switch_to_java_11.sh after: ./switch_to_java_8.sh commands: - build: mvn clean package
-
Ensure that
Docker
is up and runningproject: Containerized Project before: ./docker_run.sh commands: - build: ./gradlew clean
-
Clean up database after some commands
project: Containerized Project after: ./clean_database.sh commands: - build: ./gradlew clean
Command usage
usage: 1build [-h] [-l] [-v] [command]
positional arguments:
command Command to run - from `1build.yaml` file
optional arguments:
-h, --help Print this help message
-l, --list Show all available commands - from `1build.yaml` file
-v, --version Show version of 1build and exit
-i, --init Create default `1build.yaml` configuration file
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 CHANGELOG.md.
The format is based on Keep a Changelog.
License
This project is licensed under the MIT License - see the LICENSE file for details
Authors
- Gopinath Langote - Initial work & Maintainer – Github –Twitter
- Alexander Lukianchuk - Maintainer – Github – Twitter
See also the list of contributors who participated in this project.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file 1build-1.1.1.tar.gz
.
File metadata
- Download URL: 1build-1.1.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a77c2012eb31a61e8ff68113623c7c01c45755d545bd684943b242f4981e41b |
|
MD5 | 5737da80d119be9236b503a4d19d3a00 |
|
BLAKE2b-256 | 7e7c75421f1a5eddcc7114bfc27831e693ce2449275d1481c4abb668e424de94 |
File details
Details for the file 1build-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: 1build-1.1.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad795083042bc0a6e6b199fab16d68d9b749049a8e84542202690ea3faddc6bd |
|
MD5 | ee7f4f3fafc6f3fea9a029e5be1cb506 |
|
BLAKE2b-256 | a79a43232eb7a3c492de277f3a20835ef90706a03cb7ed4fb15d6fc8d09e7e38 |