File tree 2 files changed +40
-1
lines changed
2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -69,4 +69,4 @@ fastlane/test_output
69
69
fastlane /readme.md
70
70
71
71
# custom scripts
72
- * .sh
72
+ publish .sh
Original file line number Diff line number Diff line change
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
+
You can’t perform that action at this time.
0 commit comments