mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 12:26:13 +00:00
Merge branch 'main' into docs-guides
This commit is contained in:
@@ -4,7 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
# run only against tags
|
# run only against tags
|
||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "infisical-cli/v*.*.*"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -41,13 +41,14 @@ jobs:
|
|||||||
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
|
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
|
||||||
- uses: goreleaser/goreleaser-action@v4
|
- uses: goreleaser/goreleaser-action@v4
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser-pro
|
||||||
version: latest
|
version: latest
|
||||||
args: release --clean
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}
|
||||||
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
|
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
|
||||||
AUR_KEY: ${{ secrets.AUR_KEY }}
|
AUR_KEY: ${{ secrets.AUR_KEY }}
|
||||||
|
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
- run: pip install --upgrade cloudsmith-cli
|
- run: pip install --upgrade cloudsmith-cli
|
||||||
- name: Publish to CloudSmith
|
- name: Publish to CloudSmith
|
||||||
|
|||||||
+20
-32
@@ -11,6 +11,10 @@ before:
|
|||||||
- ./cli/scripts/completions.sh
|
- ./cli/scripts/completions.sh
|
||||||
- ./cli/scripts/manpages.sh
|
- ./cli/scripts/manpages.sh
|
||||||
|
|
||||||
|
monorepo:
|
||||||
|
tag_prefix: infisical-cli/
|
||||||
|
dir: cli
|
||||||
|
|
||||||
builds:
|
builds:
|
||||||
- id: darwin-build
|
- id: darwin-build
|
||||||
binary: infisical
|
binary: infisical
|
||||||
@@ -74,14 +78,7 @@ checksum:
|
|||||||
name_template: "checksums.txt"
|
name_template: "checksums.txt"
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ incpatch .Version }}-devel"
|
name_template: "{{ .Version }}-devel"
|
||||||
|
|
||||||
changelog:
|
|
||||||
sort: asc
|
|
||||||
filters:
|
|
||||||
exclude:
|
|
||||||
- "^docs:"
|
|
||||||
- "^test:"
|
|
||||||
|
|
||||||
# publishers:
|
# publishers:
|
||||||
# - name: fury.io
|
# - name: fury.io
|
||||||
@@ -101,12 +98,12 @@ brews:
|
|||||||
folder: Formula
|
folder: Formula
|
||||||
homepage: "https://infisical.com"
|
homepage: "https://infisical.com"
|
||||||
description: "The official Infisical CLI"
|
description: "The official Infisical CLI"
|
||||||
install: |-
|
# install: |-
|
||||||
bin.install "infisical"
|
# bin.install "infisical"
|
||||||
bash_completion.install "completions/infisical.bash" => "infisical"
|
# bash_completion.install "completions/infisical.bash" => "infisical"
|
||||||
zsh_completion.install "completions/infisical.zsh" => "_infisical"
|
# zsh_completion.install "completions/infisical.zsh" => "_infisical"
|
||||||
fish_completion.install "completions/infisical.fish"
|
# fish_completion.install "completions/infisical.fish"
|
||||||
man1.install "manpages/infisical.1.gz"
|
# man1.install "manpages/infisical.1.gz"
|
||||||
|
|
||||||
nfpms:
|
nfpms:
|
||||||
- id: infisical
|
- id: infisical
|
||||||
@@ -124,15 +121,15 @@ nfpms:
|
|||||||
- apk
|
- apk
|
||||||
- archlinux
|
- archlinux
|
||||||
bindir: /usr/bin
|
bindir: /usr/bin
|
||||||
contents:
|
# contents:
|
||||||
- src: ./completions/infisical.bash
|
# - src: ./completions/infisical.bash
|
||||||
dst: /etc/bash_completion.d/infisical
|
# dst: /etc/bash_completion.d/infisical
|
||||||
- src: ./completions/infisical.fish
|
# - src: ./completions/infisical.fish
|
||||||
dst: /usr/share/fish/vendor_completions.d/infisical.fish
|
# dst: /usr/share/fish/vendor_completions.d/infisical.fish
|
||||||
- src: ./completions/infisical.zsh
|
# - src: ./completions/infisical.zsh
|
||||||
dst: /usr/share/zsh/site-functions/_infisical
|
# dst: /usr/share/zsh/site-functions/_infisical
|
||||||
- src: ./manpages/infisical.1.gz
|
# - src: ./manpages/infisical.1.gz
|
||||||
dst: /usr/share/man/man1/infisical.1.gz
|
# dst: /usr/share/man/man1/infisical.1.gz
|
||||||
|
|
||||||
scoop:
|
scoop:
|
||||||
bucket:
|
bucket:
|
||||||
@@ -159,15 +156,6 @@ aurs:
|
|||||||
install -Dm755 "./infisical" "${pkgdir}/usr/bin/infisical"
|
install -Dm755 "./infisical" "${pkgdir}/usr/bin/infisical"
|
||||||
# license
|
# license
|
||||||
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/infisical/LICENSE"
|
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/infisical/LICENSE"
|
||||||
# completions
|
|
||||||
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
|
|
||||||
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
|
|
||||||
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
|
|
||||||
install -Dm644 "./completions/infisical.bash" "${pkgdir}/usr/share/bash-completion/completions/infisical"
|
|
||||||
install -Dm644 "./completions/infisical.zsh" "${pkgdir}/usr/share/zsh/site-functions/infisical"
|
|
||||||
install -Dm644 "./completions/infisical.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/infisical.fish"
|
|
||||||
# man pages
|
|
||||||
install -Dm644 "./manpages/infisical.1.gz" "${pkgdir}/usr/share/man/man1/infisical.1.gz"
|
|
||||||
|
|
||||||
# dockers:
|
# dockers:
|
||||||
# - dockerfile: cli/docker/Dockerfile
|
# - dockerfile: cli/docker/Dockerfile
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ And much more.
|
|||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
| Check out the [Quickstarts](https://infisical.com/docs/documentation/getting-started/introduction) Guide
|
Check out the [Quickstart](https://infisical.com/docs/getting-started/introduction) Guides
|
||||||
|
|
||||||
### Use Infisical Cloud
|
### Use Infisical Cloud
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ const client = new InfisicalClient({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const getPort = async () => (await client.getSecret('PORT')).secretValue || 4000;
|
export const getPort = async () => (await client.getSecret('PORT')).secretValue || 4000;
|
||||||
export const getInviteOnlySignup = async () => (await client.getSecret('INVITE_ONLY_SIGNUP')).secretValue == undefined ? false : await client.getSecret('INVITE_ONLY_SIGNUP');
|
export const getInviteOnlySignup = async () => (await client.getSecret('INVITE_ONLY_SIGNUP')).secretValue == undefined ? false : (await client.getSecret('INVITE_ONLY_SIGNUP')).secretValue;
|
||||||
export const getEncryptionKey = async () => (await client.getSecret('ENCRYPTION_KEY')).secretValue;
|
export const getEncryptionKey = async () => (await client.getSecret('ENCRYPTION_KEY')).secretValue;
|
||||||
export const getSaltRounds = async () => parseInt((await client.getSecret('SALT_ROUNDS')).secretValue) || 10;
|
export const getSaltRounds = async () => parseInt((await client.getSecret('SALT_ROUNDS')).secretValue) || 10;
|
||||||
export const getJwtAuthLifetime = async () => (await client.getSecret('JWT_AUTH_LIFETIME')).secretValue || '10d';
|
export const getJwtAuthLifetime = async () => (await client.getSecret('JWT_AUTH_LIFETIME')).secretValue || '10d';
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
)
|
)
|
||||||
@@ -73,7 +75,23 @@ func getLatestTag(repoOwner string, repoName string) (string, error) {
|
|||||||
return "", fmt.Errorf("failed to unmarshal github response: %w", err)
|
return "", fmt.Errorf("failed to unmarshal github response: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return tags[0].Name[1:], nil
|
// Filter tags with prefix "infisical-cli/"
|
||||||
|
prefix := "infisical-cli/v"
|
||||||
|
var validTags []string
|
||||||
|
for _, tag := range tags {
|
||||||
|
if strings.HasPrefix(tag.Name, prefix) {
|
||||||
|
validTags = append(validTags, tag.Name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(validTags) == 0 {
|
||||||
|
return "", errors.New("no tags for the CLI is found")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extract the version from the first valid tag
|
||||||
|
version := strings.TrimPrefix(validTags[0], prefix)
|
||||||
|
|
||||||
|
return version, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetUpdateInstructions() string {
|
func GetUpdateInstructions() string {
|
||||||
|
|||||||
Reference in New Issue
Block a user