Skip to content

Commit 8e1bc82

Browse files
committed
🔧
1 parent 9d9a5f5 commit 8e1bc82

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ fastlane/test_output
6969
fastlane/readme.md
7070

7171
# custom scripts
72-
*.sh
72+
publish.sh

entrypoint.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
if [ -z ${CRED+x} ]; then
5+
echo "No authentication has been set, you might run into errors...";
6+
else
7+
echo "Authentication using $CRED";
8+
9+
if [ $CRED = "username" ];
10+
then
11+
sh -c "jfrog rt config --interactive=false --enc-password=true --url=$URL --user=$USER --password=$PASSWORD"
12+
elif [ $CRED = "apikey" ];
13+
then
14+
sh -c "jfrog rt config --interactive=false --enc-password=true --url=$URL --apikey=$APIKEY"
15+
elif [ $CRED = "accesstoken" ];
16+
then
17+
sh -c "jfrog rt config --interactive=false --enc-password=true --url=$URL --access-token=$ACCESSTOKEN"
18+
else
19+
echo "";
20+
fi
21+
fi
22+
23+
for cmd in "$@"; do
24+
echo "Running '$cmd'..."
25+
if [ "$cmd" != "-v" ]; then
26+
if sh -c "jfrog rt $cmd"; then
27+
# no op
28+
echo "Successfully ran '$cmd'"
29+
else
30+
exit_code=$?
31+
echo "Failure running '$cmd', exited with $exit_code"
32+
exit $exit_code
33+
fi
34+
else
35+
sh -c "jfrog $cmd"
36+
echo "Successfully ran '$cmd'"
37+
fi
38+
done
39+

0 commit comments

Comments
 (0)