Skip to content

Commit

Permalink
Merge pull request #82 from ekristen/beta-prep
Browse files Browse the repository at this point in the history
chore: docs and scripts
  • Loading branch information
ekristen authored Nov 24, 2024
2 parents dc01080 + 5e37bf1 commit e3b520b
Show file tree
Hide file tree
Showing 12 changed files with 351 additions and 133 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/installers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: installers

on:
release:
types: [published]

jobs:
generate-installers:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4

- name: set-version
run: |
sed -e "s/__VERSION__/${{ github.event.release.tag_name }}/" scripts/installer.tpl.sh > installer.sh
sed -e "s/__VERSION__/${{ github.event.release.tag_name }}/" scripts/installer.tpl.ps1 > installer.ps1
- name: upload
uses: softprops/action-gh-release@v2
with:
files: |
installer.sh
installer.ps1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
public/
.env*
*.key
installer.*
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,43 +38,37 @@ and many others to pre-compile their software and put their binaries up on GitHu

## Install

## MacOS/Linux
### MacOS/Linux

1. Set your path `export PATH=$HOME/.distillery/bin:$PATH`
2. Download the latest release from the [releases page](https://github.com/ekristen/distillery/releases)
3. Extract and Run `./dist install ekristen/distillery`
4. Delete `./dist` and the .tar.gz, now use `dist` normally
5. Run `dist install owner/repo` to install a binary from GitHub Repository

## Windows
### Windows

1. [Set Your Path](#set-your-path)
2. Download the latest release from the [releases page](https://github.com/ekristen/distillery/releases)
3. Extract and Run `.\dist.exe install ekristen/distillery`
4. Delete `.\dist.exe` and the .zip, now use `dist` normally
5. Run `dist install owner/repo` to install a binary from GitHub Repository

### Set Your Path
#### Set Your Path

#### For Current Session
##### For Current Session

```powershell
$env:Path = "C:\Users\<username>\.distillery\bin;" + $env:Path
```

#### For Current User
##### For Current User

```powershell
[Environment]::SetEnvironmentVariable("Path", "C:\Users\<username>\.distillery\bin;" + $env:Path, [EnvironmentVariableTarget]::User)
```

### For System

```powershell
[Environment]::SetEnvironmentVariable("Path", "C:\Users\<username>\.distillery\bin;" + $env:Path, [EnvironmentVariableTarget]::Machine)
```

### Uninstall
## Uninstall

1. Run `dist info`
2. Remove the directories listed under the cleanup section
Expand Down Expand Up @@ -114,7 +108,8 @@ dist install homebrew/opentofu
- GitHub
- GitLab
- Homebrew (binaries only, if anything has a dependency, it will not work at this time)
- Hashicorp (special handling for their releases, pointing to github repos will automatically pass through)
- Hashicorp (special handling for their releases, pointing to GitHub repos will automatically pass through)
- Kubernetes (special handling for their releases, pointing to GitHub repos will automatically pass through)

### Authentication

Expand Down Expand Up @@ -144,6 +139,12 @@ versions are symlinked with the suffix `@version` this means you can have multip
It also means you can call any version any time using the `@version` syntax or if you are using something like [direnv](https://direnv.net/)
you can set aliases in your `.envrc` file for specific versions.

#### Example

```console
alias terraform="[email protected]"
```

## Directory Structure

This is the default directory structure that distillery uses. Some of this can be overridden via the configuration.
Expand Down
69 changes: 11 additions & 58 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,66 +8,19 @@ The default location for the configuration file is operating system dependent. Y

The configuration file is optional. If it is not found, the default configuration is used.

## Aliases
!!! note - "Pro Tip"
You can change the default location of your configuration file by setting the `DISTILLERY_CONFIG` environment variable.

You can configure aliases for your installation sources. This is useful if you don't want to type the whole
path all the time.
## Default Configuration

### Simple Alias Definition
=== "YAML"

```yaml
aliases:
dist: ekristen/distillery
aws-nuke: ekristen/aws-nuke
age: filosottile/age
```
```yaml
default_provider: github
```

OR in TOML
=== "TOML"

```toml
[aliases]
dist = "ekristen/distillery"
aws-nuke = "ekristen/aws-nuke"
age = "filosottile/age"
```

### Alias with Version

```yaml
aliases:
dist: ekristen/distillery
aws-nuke: ekristen/aws-nuke
age: filosottile/[email protected]
```
OR in TOML
```toml
[aliases]
dist = "ekristen/distillery"
aws-nuke = "ekristen/aws-nuke"
age = "filosottile/[email protected]"
```

### Alias with Version as Object

```yaml
aliases:
dist: ekristen/distillery
aws-nuke: ekristen/aws-nuke
age:
name: filosottile/age
version: 1.0.0
```
OR in TOML
```toml
[aliases]
dist = "ekristen/distillery"
aws-nuke = "ekristen/aws-nuke"

[aliases.age]
name = "filosottile/age"
version = "1.0.0"
```
```toml
default_provider = "github"
```
88 changes: 88 additions & 0 deletions docs/config/aliases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Aliases

You can configure aliases for your installation sources. This is useful if you don't want to type the whole
path all the time.

## Simple Definition

=== "YAML"

```yaml
aliases:
dist: ekristen/distillery
aws-nuke: ekristen/aws-nuke
age: filosottile/age
```

=== "TOML"

```toml
[aliases]
dist = "ekristen/distillery"
aws-nuke = "ekristen/aws-nuke"
age = "filosottile/age"
```

## With Version

=== "YAML"

```yaml
aliases:
dist: ekristen/distillery
aws-nuke: ekristen/aws-nuke
age: filosottile/[email protected]
```

=== "TOML"

```toml
[aliases]
dist = "ekristen/distillery"
aws-nuke = "ekristen/aws-nuke"
age = "filosottile/[email protected]"
```

## With Version as Object

=== "YAML"

```yaml
aliases:
dist: ekristen/distillery
aws-nuke: ekristen/aws-nuke
age:
name: filosottile/age
version: 1.0.0
```

=== "TOML"

```toml
[aliases]
dist = "ekristen/distillery"
aws-nuke = "ekristen/aws-nuke"

[aliases.age]
name = "filosottile/age"
version = "1.0.0"
```

## With Providers

=== "YAML"


```yaml
aliases:
age: github/filosottile/age
gitlab-runner: gitlab/gitlab-org/gitlab-runner
```

=== "TOML"

```toml
[aliases]
age = "github/filosottile/age"
gitlab-runner = "gitlab/gitlab-org/gitlab-runner"
```
62 changes: 10 additions & 52 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Distillery
## Quickstart

![Static Badge](https://img.shields.io/badge/Status%20-%20Beta%20-%20orange)
![GitHub Release](https://img.shields.io/github/v/release/ekristen/distillery?include_prereleases)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/ekristen/distillery/total)
![GitHub License](https://img.shields.io/github/license/ekristen/distillery)
=== "MacOS/Linux"
```bash
curl --proto '=https' --tlsv1.2 -LsSf https://get.dist.sh | sh
```

[![Known Vulnerabilities](https://snyk.io/test/github/ekristen/distillery/badge.svg)](https://snyk.io/test/github/ekristen/distillery)
[![Go Report Card](https://goreportcard.com/badge/github.com/ekristen/distillery)](https://goreportcard.com/report/github.com/ekristen/distillery)
=== "Windows"
```powershell
iwr https://get.dist.sh/ps1 -useb | iex
```

Most things are working, this project follows semantic commits and semantic releases, any breaking
changes will result in new major versions.
**Note:** Yes, I know, you really shouldn't download and run scripts from the internet, but at least it's not using `sudo`!

## Overview

Expand All @@ -36,49 +37,6 @@ and many others to pre-compile their software and put their binaries up on GitHu
- Support checksum verifications (if they exist)
- Support signatures verifications (if they exist) (**not implemented yet**)

## Install

## MacOS/Linux

1. Set your path `export PATH=$HOME/.distillery/bin:$PATH`
2. Download the latest release from the [releases page](https://github.com/ekristen/distillery/releases)
3. Extract and Run `./dist install ekristen/distillery`
4. Delete `./dist` and the .tar.gz, now use `dist` normally
5. Run `dist install owner/repo` to install a binary from GitHub Repository

## Windows

1. [Set Your Path](#set-your-path)
2. Download the latest release from the [releases page](https://github.com/ekristen/distillery/releases)
3. Extract and Run `.\dist.exe install ekristen/distillery`
4. Delete `.\dist.exe` and the .zip, now use `dist` normally
5. Run `dist install owner/repo` to install a binary from GitHub Repository

### Set Your Path

#### For Current Session

```powershell
$env:Path = "C:\Users\<username>\.distillery\bin;" + $env:Path
```

#### For Current User

```powershell
[Environment]::SetEnvironmentVariable("Path", "C:\Users\<username>\.distillery\bin;" + $env:Path, [EnvironmentVariableTarget]::User)
```

### For System

```powershell
[Environment]::SetEnvironmentVariable("Path", "C:\Users\<username>\.distillery\bin;" + $env:Path, [EnvironmentVariableTarget]::Machine)
```

### Uninstall

1. Run `dist info`
2. Remove the directories listed under the cleanup section

### Examples

Install a specific version of a tool using `@version` syntax. `github` is the default scope, this implies
Expand Down
Loading

0 comments on commit e3b520b

Please sign in to comment.