Giter Site home page Giter Site logo

duckup's Introduction

Duckup

Since duckdb CLI can't yet be installed via a linux package manager, this will install the latest version of the duckdb CLI on your computer. Default location is ~/.local/bin/, but you can choose your own location with the --folder_path option.

Use with caution, it will overwrite an existing binary.

Goals

It would be nice to eventually make this tool work like the wonderful rustup and juliaup tools. However, there is a very long way to go to reach that.

Use

  1. Have the rust toolchain installed
  2. Run cargo install duckup
  3. Run duckup for help message
  4. Run duckup update to install the latest version of the duckdb CLI into ~/.local/bin. Run duckup update --folder_path /path/to/desired/location/ to install to a location of your choice.

duckup's People

Contributors

natemcintosh avatar

Stargazers

Eddy Shoemaker avatar

Watchers

 avatar

duckup's Issues

Check that the `duckdb` file is in the zip file, as expected

Goal

A zip file can have any number of files and folders within it. Check that there actually is one called duckdb when the zip file is unzipped.

Required features

  • Make sure there is at least one file called duckdb

Out of scope

  • Dealing with any other files that might be in the zip file.

Newly installed binary is not executable

Goal

While the binary is currently installed in the right place, it is not executable. It should automatically be made executable.

Context

To make this work on linux and mac, I would usually run chmod +x <name_of_file>. I expect we can do the same here. However, I am less sure of how this works on windows; will have to make a list of things that may/will be different if the tool ever gets to that point.

Required features

  • Make the newly downloaded file executable

Out of scope

  • Anything beyond making it executable

Related documents

Add OS detection and associated errors

Goal

Instead of assuming that the tool is being run on Linux, check what the OS actually is, and provide an error if it is not Linux. (Working non-Linux versions could eventually happen).

Context

Currently, duckup simply assumes it is being run Linux, and downloads a Linux binary. It should instead fail on any platforms that are not Linux.

Required features

  • Can detect if OS is macOS or Windows
  • Errors out for mac and Windows (for now)

Specifications

  • An early check of the OS in main()
  • An early failure if not running on Linux

Related documents

Add pre-commit

Goal

Keep the repo in good shape via pre-commit

Context

Pre-commit helps to keep repos in good shape by ensuring a set of rules. It is usually installed as a git hook, and automatically run before a commit happens. It can also be run as CI, helping to ensure PRs look good.

Required features

  • Add pre-commit CI
  • Add pre-commit fmt

Related documents

Update readme for v0.2

Goal

Make sure the README is up to date.

Context

Want to make sure it has a good description of what it does, its limitations, and how to use it.

Add tests

Goal

There are currently no tests, and everything is very sketchy; way too easy to accidentally overwrite stuff, or mess up existing files and folders.

Required features

  • Test mocking the API call to github to get the latest release info
  • Test mocking the API call to download the correct binary
  • Warn user if overwriting an existing file

Related documents

Add option to specify binary location

Goal

Would be nice to install the binary to wherever one desires, settable via a CLI flag.

Context

duckup currently installs to ~/.local/bin/, always. This kinda works for linux, maybe mac, and probably not windows. If duckdb is ever going to work outside linux, binary location should be an option. It would also be nice to just set it to wherever one wants if ~/.local/bin/ is the best option.

Required features

  • A CLI argument for installation location, with a default of ~/.local/bin/
  • Stick the binary at the location specified

Out of scope

  • Anything other than allowing it to be installed at a user specified location. Maybe at some point, can think about having something like a ~/.duckup/ folder.

Add logging

Goal

Add proper logging.

Context

It would be really nice to be able to see high quality logs for this.

Required features

  • Allow user to set log level with an environment variable
  • Tell them where logs were saved, if any
  • Explain logging in readme

Out of scope

Related documents

Add clap for CLI help

Goal

Add clap to add some CLI niceties. Print out help messages when run without any arguments (and when run with -h), and have an update command as the primary task.

Context

In a perfect world, duckup could one day be similar to rustup or juliaup in terms of the commands available. The first step on that road is just having some sort of CLI.

Required features

  • Print a help message for -h, --help, or no argument
  • Print a version number for -V or --version
  • Have an duckup update command that actually runs the update

Specifications

  • All arguments have help messages so auto-generated help works well
  • Running with no arguments also prints the help message
  • A update command that performs the update.

Out of scope

  • Any other commands beyond update, help, and version
  • Any new functionality beyond adding the CLI

Related documents

cargo publish duckup

Goal

Be able to publish the tool on crates; installable with cargo install duckup.

Context

Cargo is a really easy way to distribute binaries. Users with cargo installed on their system can cargo install <some_binary>, and as long as the author has done a good job, it should install for their system.

Required features

  • A page on crates.io
  • Working install via cargo install duckup

Specifications

Related documents

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.