Coder Social home page Coder Social logo

flyenv's Introduction

Flyenv

If you need to work with multiple Concourse instances running on different version, you must have run fly -t <target> sync a couple times when you jumping back and forth between those instances.

flyenv could be the solution.

It manages the fly cli version for you:

$ mv flyenv $(command -v fly)
$ fly --version # it downloads the latest fly cli from github when running for the first time
2020/04/10 19:54:06 download cli from: https://github.com/concourse/concourse/releases/download/v6.0.0/fly-6.0.0-darwin-amd64.tgz
6.0.0-flyenv

$ fly -t c571 curl /api/v1/info
2020/04/10 19:56:03 download cli from: https://c571.local/api/v1/cli?arch=amd64&platform=darwin
{"version":"5.7.1","worker_version":"2.2","external_url":"https://c571.local"}

$ fly -t c580 curl /api/v1/info
2020/04/10 19:57:00 download cli from: https://c580.local/api/v1/cli?arch=amd64&platform=darwin
{"version":"5.8.0","worker_version":"2.2","external_url":"https://c580.local"}

$ fly -t c571 --version # "-flyenv" suffix is added to differentiate with fly cli
5.7.1-flyenv

$ fly --version # for commands without a target it fallback to use the cli downloaed initially
6.0.0-flyenv

How it works

When you use the command with the specific target, it fetches the concourse version of the target and determine if the corresponding fly version is already installed under $HOME/.flyenv/<version>/fly. If not it downloads the fly cli from the target and put it to the directory above.

Skip SSL Validation

Sometimes you may have Concourse targets that don't have valid certificates. You can tell flyenv to skip SSL validation by setting the FLYENV_SKIP_SSL environment variable before running fly commands.

Installation

Download the binary from release.

Recommended:

override the fly installed with the flyenv binary to have a more transparent experience.

Install from source

  1. clone the repo
  2. go mod download
  3. go build

flyenv's People

Contributors

crsimmons avatar fredwangwang avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

crsimmons

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.