Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit dcbe81f

Browse files
authored
Merge pull request #200 from secrethub/feature/yum
YUM release changes
2 parents aa7d9f3 + 809723a commit dcbe81f

3 files changed

Lines changed: 25 additions & 10 deletions

File tree

.goreleaser.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
project_name: secrethub
1+
project_name: secrethub-cli
22

33
builds:
44
- &default
@@ -40,7 +40,7 @@ builds:
4040
binary: "secrethub"
4141

4242
archives:
43-
- name_template: "{{ .ProjectName }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
43+
- name_template: "secrethub-{{ .Tag }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
4444
builds:
4545
- default
4646
format_overrides:
@@ -50,7 +50,7 @@ archives:
5050
- LICENSE
5151

5252
checksum:
53-
name_template: "{{ .ProjectName }}-{{ .Tag }}-checksums.txt"
53+
name_template: "secrethub-{{ .Tag }}-checksums.txt"
5454

5555
brews:
5656
- name: secrethub-cli
@@ -90,7 +90,7 @@ scoop:
9090
license: Apache-2.0
9191

9292
nfpms:
93-
-
93+
- name_template: "secrethub-{{ .Tag }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
9494
builds:
9595
- without-bin-dir
9696
vendor: SecretHub

scripts/post-install.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/usr/bin/env sh
22

3-
BASH_COMPLETION_DIR=$(pkg-config --variable=completionsdir bash-completion)
4-
if [ -d ${BASH_COMPLETION_DIR} ]; then
5-
echo -e "==> Installing completion for Bash"
3+
CONF_DIR=$(pkg-config --variable=completionsdir bash-completion)
4+
if [ "${CONF_DIR}" != "" ]; then
5+
BASH_COMPLETION_DIR=$CONF_DIR
6+
elif [ -d /usr/share/bash-completion/completions/ ]; then
7+
BASH_COMPLETION_DIR=/usr/share/bash-completion/completions/
8+
fi
9+
10+
if [ "${BASH_COMPLETION_DIR}" != "" ] && [ -d ${BASH_COMPLETION_DIR} ]; then
11+
echo "Installing completion for Bash"
612
/usr/bin/secrethub --completion-script-bash > ${BASH_COMPLETION_DIR}/secrethub
713
fi

scripts/post-remove.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/usr/bin/env sh
22

3-
BASH_COMPLETION_DIR=$(pkg-config --variable=completionsdir bash-completion)
4-
if [ -d ${BASH_COMPLETION_DIR} ]; then
5-
rm -f ${BASH_COMPLETION_DIR}/secrethub
3+
# Only execute if this is an uninstall, not an upgrade.
4+
if [ "$1" = "0" ]; then
5+
CONF_DIR=$(pkg-config --variable=completionsdir bash-completion)
6+
if [ "${CONF_DIR}" != "" ]; then
7+
BASH_COMPLETION_DIR=$CONF_DIR
8+
elif [ -d /usr/share/bash-completion/completions/ ]; then
9+
BASH_COMPLETION_DIR=/usr/share/bash-completion/completions/
10+
fi
11+
12+
if [ -d ${BASH_COMPLETION_DIR} ] && [ "${BASH_COMPLETION_DIR}" != "" ]; then
13+
rm -f ${BASH_COMPLETION_DIR}/secrethub
14+
fi
615
fi

0 commit comments

Comments
 (0)