Update some stuff, now everything must work
This commit is contained in:
parent
ce0a54a08b
commit
18fd9d827b
3
.github/workflows/container-stable.yaml
vendored
3
.github/workflows/container-stable.yaml
vendored
@ -41,7 +41,8 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.action_repository }}:stable
|
ghcr.io/${{ github.repository }}:stable
|
||||||
|
ghcr.io/${{ github.repository }}:latest
|
||||||
labels: |
|
labels: |
|
||||||
action_id=${{ github.action }}
|
action_id=${{ github.action }}
|
||||||
action_link=${{ env.LINK }}
|
action_link=${{ env.LINK }}
|
||||||
|
2
.github/workflows/container-version.yaml
vendored
2
.github/workflows/container-version.yaml
vendored
@ -44,7 +44,7 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.action_repository }}:${{ env.TAG }}
|
ghcr.io/${{ github.repository }}:${{ env.TAG }}
|
||||||
labels: |
|
labels: |
|
||||||
action_id=${{ github.action }}
|
action_id=${{ github.action }}
|
||||||
action_link=${{ env.LINK }}
|
action_link=${{ env.LINK }}
|
||||||
|
@ -7,6 +7,7 @@ RUN cargo build --release
|
|||||||
|
|
||||||
FROM alpine:3.17.1
|
FROM alpine:3.17.1
|
||||||
COPY --from=builder /src/target/release/clin /bin/clin
|
COPY --from=builder /src/target/release/clin /bin/clin
|
||||||
RUN apk update && apk add openssl --no-cache
|
RUN apk update && apk add --no-cache libressl-dev libc6-compat
|
||||||
|
RUN chmod +x /bin/clin
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
ENTRYPOINT ["/bin/clin"]
|
ENTRYPOINT ["/bin/clin"]
|
||||||
|
50
README.md
50
README.md
@ -2,8 +2,54 @@
|
|||||||
> It's actually not and installer, but a downloader, clin just sounds better than cldow IMHO
|
> It's actually not and installer, but a downloader, clin just sounds better than cldow IMHO
|
||||||
|
|
||||||
# What's it about?
|
# What's it about?
|
||||||
To be done
|
It's just a tool to make downloading binaries for different platforms easier.
|
||||||
|
## For example
|
||||||
|
If you want to build a docker image, but you want to make it available on different platforms. But your tool needs other tools as dependencies, e.g. `helm`.
|
||||||
|
To install helm on Alpine you need to use curl, wget, or something. You need to choose a version, an operating system, and an architecture. For me, it was obvious that you must be able to use `uname -m`...
|
||||||
|
```BASH
|
||||||
|
uname -m
|
||||||
|
aarch64
|
||||||
|
|
||||||
|
uname -m
|
||||||
|
x86_64
|
||||||
|
|
||||||
|
uname -m
|
||||||
|
arm64
|
||||||
|
```
|
||||||
|
|
||||||
|
While release naming is also not very consecutive
|
||||||
|
|
||||||
|
- release_example.amd-macos.zip
|
||||||
|
- another-release-for-amd64-macos.zip
|
||||||
|
- linux-aarch64-release.zip
|
||||||
|
|
||||||
# How to install?
|
# How to install?
|
||||||
To be done
|
## Install
|
||||||
|
### Download
|
||||||
|
|
||||||
|
Get executable from github releases
|
||||||
|
|
||||||
|
Prebuilt binaries exist for **Linux x86_64** and **MacOS arm64** and **x86_64**
|
||||||
|
|
||||||
|
Don't forget to add the binary to $PATH
|
||||||
|
```
|
||||||
|
$ curl https://raw.githubusercontent.com/allanger/clever-install/main/scripts/download_clin.sh | bash
|
||||||
|
$ clin -h
|
||||||
|
```
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
You can use the `latest` or a `tagged` docker image
|
||||||
|
```
|
||||||
|
$ docker pull ghcr.io/allanger/clever-install:latest
|
||||||
|
$ docker run ghcr.io/allanger/clever-install:latest clin -h
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build from source
|
||||||
|
1. Build binary
|
||||||
|
```
|
||||||
|
$ cargo build --release
|
||||||
|
```
|
||||||
|
2. Run `gum help`
|
||||||
|
|
||||||
# How to use?
|
# How to use?
|
||||||
To be done
|
To be done
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo 'renaming clin to clin-$VERSION-$SYSTEM format'
|
echo 'renaming clin to clin-$VERSION-$SYSTEM format'
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
echo "version - $clin_VERSION"
|
echo "version - $CLIN_VERSION"
|
||||||
for BUILD in build*; do
|
for BUILD in build*; do
|
||||||
SYSTEM=$(echo $BUILD | sed -e 's/build-//g')
|
SYSTEM=$(echo $BUILD | sed -e 's/build-//g')
|
||||||
echo "system - $SYSTEM"
|
echo "system - $SYSTEM"
|
||||||
|
@ -11,9 +11,9 @@ use std::{
|
|||||||
process::exit,
|
process::exit,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Check you helm releaseas managed by Argo
|
/// Maybe not that clever, but at least not dumb. Download binaries for defferent architectures easier
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
#[clap(author = "allanger <allanger@zohomail.com>", version, about, long_about = None)]
|
#[clap(author = "allanger <allanger@zohomail.com>", version, about, long_about = None, arg_required_else_help(true))]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// A templated link for downloading
|
/// A templated link for downloading
|
||||||
#[clap(short, long, env = "CLIN_LINK")]
|
#[clap(short, long, env = "CLIN_LINK")]
|
||||||
|
Loading…
Reference in New Issue
Block a user