GithubHelp home page GithubHelp logo

bufbuild / bufisk Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 1.0 30 KB

Bazelisk, but for Buf. A user-friendly launcher for Buf.

Home Page: https://buf.build

License: Apache License 2.0

Makefile 9.54% Go 75.63% Shell 14.83%
buf-cli buf-schema-registry grpc protobuf protoc protocol-buffers

bufisk's Introduction

Bufisk

Download and run buf based on configuration from your environment.

Inspired by Bazelisk.

Bufisk will use (in order);

  • A version specified in the environment variable ${BUF_VERSION}.
  • A version specified in a file named .bufversion in your current directory, or recursively in any parent directory.

The specified version must be a valid Buf release version from github.com/bufbuild/buf/releases.

Bufisk will also download the released sha256.txt and sha256.txt.minisig, and do all verification.

All arguments passed to bufisk are transparently passed through to buf.

export BUF_VERSION=1.28.1
bufisk lint
echo 1.28.1 > .bufversion
bufisk lint

Bufisk downloads releases to a cache directory. In most Unix-like cases, this will be ~/.cache/bufisk.

The full logic:

The cache directory specified by ${BUF_CACHE_DIR}. If ${BUF_CACHE_DIR} is not set (as it usually is not), the cache directory defaults to:

  • Linux, Darwin: ${XDG_CACHE_HOME}/bufisk, and if ${XDG_CACHE_HOME} is not set, ${HOME}/.cache/bufisk.
  • Windows: %LocalAppData%\bufisk.

Status: Alpha

Not yet stable.

Needs some hardening, better error messages, graceful handling of common error cases, a release process, etc.

We may also want to add support for non-release tags, passing through to go install github.com/bufbuild/buf/cmd/buf@${BUF_VERSION}, and potentially having special support for a latest-type tag for releases. In the go install case, we may also want to bootstrap go itself.

This has not yet been tested on Windows.

Legal

Offered under the Apache 2 license.

bufisk's People

Contributors

bufdev avatar chrispine avatar emcfarlane avatar oliversun9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

oliversun9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.