@leverege/build-tools 2.52.0 → 2.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -5
- package/src/Docker.mjs +2 -2
- package/src/bash-funcs +1 -1
- package/src/helm-charts/cnpg-operator/helmdn.plugin +16 -1
- package/src/refresh-py-idx.sh +118 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.0",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"pull-git": "src/pull-git.sh",
|
|
48
48
|
"push-my-chart": "src/push-my-chart.mjs",
|
|
49
49
|
"refresh-npm-token": "src/refresh-npm-token.mjs",
|
|
50
|
+
"refresh-py-idx": "src/refresh-py-idx.sh",
|
|
50
51
|
"send-to-slack": "src/send-to-slack.mjs",
|
|
51
52
|
"tag-release": "src/tag-release.mjs",
|
|
52
53
|
"unleash": "src/unleash.mjs"
|
|
@@ -64,20 +65,20 @@
|
|
|
64
65
|
"execa": "^9.4.0",
|
|
65
66
|
"glob": "^11.0.0",
|
|
66
67
|
"handlebars": "^4.7.8",
|
|
67
|
-
"inquirer": "^11.0
|
|
68
|
+
"inquirer": "^11.1.0",
|
|
68
69
|
"js-yaml": "^4.1.0",
|
|
69
70
|
"ms": "^2.1.3",
|
|
70
|
-
"npm-registry-fetch": "^
|
|
71
|
+
"npm-registry-fetch": "^18.0.0",
|
|
71
72
|
"package-up": "^5.0.0",
|
|
72
73
|
"parse-gitignore": "^2.0.0",
|
|
73
74
|
"read-pkg": "^9.0.1",
|
|
74
75
|
"readline-sync": "^1.4.10",
|
|
75
76
|
"semver": "^7.6.3",
|
|
76
77
|
"simple-git": "^3.27.0",
|
|
77
|
-
"zx": "^8.1.
|
|
78
|
+
"zx": "^8.1.8"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
81
|
"@leverege/eslint-config-leverege": "^4.2.0",
|
|
81
82
|
"npm": "^10.8.3"
|
|
82
83
|
}
|
|
83
|
-
}
|
|
84
|
+
}
|
package/src/Docker.mjs
CHANGED
package/src/bash-funcs
CHANGED
|
@@ -9,4 +9,19 @@ OPERATOR_SHUTDOWN
|
|
|
9
9
|
|
|
10
10
|
yesToContinue "to delete the CNPG Operator"
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
OPVER="1.24.0"
|
|
13
|
+
|
|
14
|
+
clearlyWarn DO_NOT_CLEAR
|
|
15
|
+
|
|
16
|
+
cat<<IF_YOURE_SURE
|
|
17
|
+
|
|
18
|
+
`color r "To delete the cnpg-operator execute the following command:"`
|
|
19
|
+
|
|
20
|
+
kubectl delete -f \\
|
|
21
|
+
https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-${OPVER%.*}/releases/cnpg-${OPVER}.yaml $K8S_WHAT
|
|
22
|
+
|
|
23
|
+
`color r "***DANGERZONE! running ^^that command will nuke all CNPG dbs and backups!"`
|
|
24
|
+
|
|
25
|
+
IF_YOURE_SURE
|
|
26
|
+
|
|
27
|
+
exit 0
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Execute gcloud command to get the token
|
|
4
|
+
TOKEN=$(gcloud auth print-access-token)
|
|
5
|
+
|
|
6
|
+
# Write to pip.conf
|
|
7
|
+
PIP_CONFIG_DIR="$HOME/.config/pip"
|
|
8
|
+
mkdir -p "$PIP_CONFIG_DIR"
|
|
9
|
+
PIP_CONFIG_CONTENT="
|
|
10
|
+
[global]
|
|
11
|
+
extra-index-url = https://oauth2accesstoken:${TOKEN}@us-python.pkg.dev/leverege-registry/leverege-python-packages/simple/
|
|
12
|
+
"
|
|
13
|
+
echo "$PIP_CONFIG_CONTENT" > "$PIP_CONFIG_DIR/pip.conf"
|
|
14
|
+
echo "Updated ~/.config/pip/pip.conf"
|
|
15
|
+
|
|
16
|
+
# Write to pypirc
|
|
17
|
+
PYPIRC_CONTENT="
|
|
18
|
+
[distutils]
|
|
19
|
+
index-servers =
|
|
20
|
+
leverege-python-packages
|
|
21
|
+
|
|
22
|
+
[leverege-python-packages]
|
|
23
|
+
repository: https://us-python.pkg.dev/leverege-registry/leverege-python-packages/
|
|
24
|
+
username: oauth2accesstoken
|
|
25
|
+
password: ${TOKEN}
|
|
26
|
+
"
|
|
27
|
+
echo "$PYPIRC_CONTENT" > "$HOME/.pypirc"
|
|
28
|
+
echo "Updated ~/.pypirc"
|
|
29
|
+
|
|
30
|
+
# Escape for sed
|
|
31
|
+
UV_EXTRA_INDEX_URL="https://foo:${TOKEN}@us-python.pkg.dev/leverege-registry/leverege-python-packages/simple"
|
|
32
|
+
|
|
33
|
+
SHELLS=("bash" "dash" "zsh" "fish")
|
|
34
|
+
|
|
35
|
+
for shell in "${SHELLS[@]}"; do
|
|
36
|
+
if command -v "$shell" > /dev/null 2>&1; then
|
|
37
|
+
case "$shell" in
|
|
38
|
+
bash)
|
|
39
|
+
CONFIG_FILE="$HOME/.bashrc"
|
|
40
|
+
;;
|
|
41
|
+
dash)
|
|
42
|
+
CONFIG_FILE="$HOME/.profile"
|
|
43
|
+
;;
|
|
44
|
+
zsh)
|
|
45
|
+
CONFIG_FILE="$HOME/.zshrc"
|
|
46
|
+
;;
|
|
47
|
+
fish)
|
|
48
|
+
CONFIG_FILE="$HOME/.config/fish/config.fish"
|
|
49
|
+
;;
|
|
50
|
+
*)
|
|
51
|
+
echo "Shell $shell is not supported."
|
|
52
|
+
continue
|
|
53
|
+
;;
|
|
54
|
+
esac
|
|
55
|
+
|
|
56
|
+
echo "Updating shell configuration in $CONFIG_FILE"
|
|
57
|
+
|
|
58
|
+
if [ -f "$CONFIG_FILE" ]; then
|
|
59
|
+
if grep -q "export UV_EXTRA_INDEX_URL=" "$CONFIG_FILE"; then
|
|
60
|
+
sed -i "s|export UV_EXTRA_INDEX_URL=.*|export UV_EXTRA_INDEX_URL=${UV_EXTRA_INDEX_URL}|" "$CONFIG_FILE"
|
|
61
|
+
else
|
|
62
|
+
echo -e "\nexport UV_EXTRA_INDEX_URL=${UV_EXTRA_INDEX_URL}\n" >> "$CONFIG_FILE"
|
|
63
|
+
fi
|
|
64
|
+
else
|
|
65
|
+
echo -e "\nexport UV_EXTRA_INDEX_URL=${UV_EXTRA_INDEX_URL}\n" >> "$CONFIG_FILE"
|
|
66
|
+
fi
|
|
67
|
+
else
|
|
68
|
+
echo "Shell $shell is not installed."
|
|
69
|
+
fi
|
|
70
|
+
done
|
|
71
|
+
|
|
72
|
+
function get_parent_shell() {
|
|
73
|
+
local ppid=$(ps -p $$ -o ppid= | tr -d ' ')
|
|
74
|
+
local shell=$(ps -p $ppid -o comm= | tr -d ' ')
|
|
75
|
+
|
|
76
|
+
while [ "$ppid" != "1" ]; do
|
|
77
|
+
ppid=$(ps -p $ppid -o ppid= | tr -d ' ')
|
|
78
|
+
shell=$(ps -p $ppid -o comm= | tr -d ' ')
|
|
79
|
+
|
|
80
|
+
if [[ "$shell" =~ bash|dash|zsh|fish ]]; then
|
|
81
|
+
echo "$shell"
|
|
82
|
+
return
|
|
83
|
+
fi
|
|
84
|
+
done
|
|
85
|
+
|
|
86
|
+
echo ""
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
shell=$(get_parent_shell)
|
|
90
|
+
|
|
91
|
+
if [ -z "$shell" ]; then
|
|
92
|
+
echo -e "\nCould not determine parent shell. Please source your shell configuration to apply the changes.\n"
|
|
93
|
+
echo "Example (bash): source ~/.bashrc"
|
|
94
|
+
echo "Example (dash): source ~/.profile"
|
|
95
|
+
echo "Example (zsh): source ~/.zshrc"
|
|
96
|
+
echo "Example (fish): source ~/.config/fish/config.fish"
|
|
97
|
+
exit 1
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
echo -e "\nReloading $shell shell with new configuration.\n"
|
|
101
|
+
|
|
102
|
+
case "$shell" in
|
|
103
|
+
bash)
|
|
104
|
+
source "$HOME/.bashrc"
|
|
105
|
+
;;
|
|
106
|
+
dash)
|
|
107
|
+
source "$HOME/.profile"
|
|
108
|
+
;;
|
|
109
|
+
zsh)
|
|
110
|
+
source "$HOME/.zshrc"
|
|
111
|
+
;;
|
|
112
|
+
fish)
|
|
113
|
+
source "$HOME/.config/fish/config.fish"
|
|
114
|
+
;;
|
|
115
|
+
*)
|
|
116
|
+
echo "Shell $shell is not supported."
|
|
117
|
+
;;
|
|
118
|
+
esac
|