@leverege/build-tools 2.52.0-pedro.5 → 2.52.0-pedro.7
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 +1 -1
- package/src/refresh-py-idx-sa.sh +5 -0
- package/src/refresh-py-idx.sh +25 -7
package/package.json
CHANGED
package/src/refresh-py-idx-sa.sh
CHANGED
|
@@ -63,6 +63,8 @@ echo ""
|
|
|
63
63
|
# Encode key to base64
|
|
64
64
|
ENCODED_KEY=$(base64 -i $SERVICE_ACCOUNT_KEY_PATH -o -)
|
|
65
65
|
|
|
66
|
+
echo $ENCODED_KEY
|
|
67
|
+
|
|
66
68
|
# Write to pip.conf
|
|
67
69
|
mkdir -p $HOME/.config/pip
|
|
68
70
|
cat <<EOF > $HOME/.config/pip/pip.conf
|
|
@@ -84,6 +86,9 @@ password: $ENCODED_KEY
|
|
|
84
86
|
EOF
|
|
85
87
|
echo "Updated $HOME/.pypirc"
|
|
86
88
|
|
|
89
|
+
escape_for_sed() {
|
|
90
|
+
printf '%s\n' "$1" | sed -e 's/[\/&]/\\&/g'
|
|
91
|
+
}
|
|
87
92
|
|
|
88
93
|
UV_EXTRA_INDEX_URL="https://_json_key_base64:$ENCODED_KEY@us-python.pkg.dev/leverege-registry/leverege-python-packages/simple"
|
|
89
94
|
UV_EXTRA_INDEX_URL_E=$(escape_for_sed "$UV_EXTRA_INDEX_URL")
|
package/src/refresh-py-idx.sh
CHANGED
|
@@ -75,10 +75,28 @@ for SHELL in "${SHELLS[@]}"; do
|
|
|
75
75
|
fi
|
|
76
76
|
done
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
# If $FISH_VERSION is set, then the user is using fish shell
|
|
79
|
+
if [ -n "$FISH_VERSION" ]; then
|
|
80
|
+
fish
|
|
81
|
+
else
|
|
82
|
+
# Use the shell name to source the configuration.
|
|
83
|
+
SHELL_NAME=$(ps -p $$ -o comm=)
|
|
84
|
+
case "$SHELL_NAME" in
|
|
85
|
+
bash)
|
|
86
|
+
source ~/.bashrc
|
|
87
|
+
;;
|
|
88
|
+
dash)
|
|
89
|
+
source ~/.profile
|
|
90
|
+
;;
|
|
91
|
+
zsh)
|
|
92
|
+
source ~/.zshrc
|
|
93
|
+
;;
|
|
94
|
+
fish)
|
|
95
|
+
source ~/.config/fish/config.fish
|
|
96
|
+
;;
|
|
97
|
+
*)
|
|
98
|
+
echo "Shell $SHELL_NAME is not supported."
|
|
99
|
+
;;
|
|
100
|
+
esac
|
|
101
|
+
fi
|
|
102
|
+
|