Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
12300745
Commit
12300745
authored
Apr 25, 2017
by
Taylor Thomas
Committed by
GitHub
Apr 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2324 from chipironcin/improve_get_script
Improve get script
parents
7309c1a7
18fc8a85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
get
scripts/get
+11
-7
No files found.
scripts/get
View file @
12300745
...
...
@@ -64,12 +64,16 @@ verifySupported() {
# checkLatestVersion checks the latest available version.
checkLatestVersion
()
{
# Use the GitHub
API
to find the latest version for this project.
local
latest_url
=
"https://
api.github.com/repos
/kubernetes/helm/releases/latest"
# Use the GitHub
releases webpage for the project
to find the latest version for this project.
local
latest_url
=
"https://
github.com
/kubernetes/helm/releases/latest"
if
type
"curl"
>
/dev/null
;
then
TAG
=
$(
curl
-
s
$latest_url
|
awk
'/\"tag_name\":/{gsub( /[,\"]/,"", $2); print $2
}'
)
TAG
=
$(
curl
-
SsL
$latest_url
|
awk
'/\/tag\//'
|
head
-n
1 |
cut
-d
'"'
-f
2 |
awk
'{n=split($NF,a,"/");print a[n]
}'
)
elif
type
"wget"
>
/dev/null
;
then
TAG
=
$(
wget
-q
-O
-
$latest_url
|
awk
'/\"tag_name\":/{gsub( /[,\"]/,"", $2); print $2}'
)
TAG
=
$(
wget
-q
-O
-
$latest_url
|
awk
'/\/tag\//'
|
head
-n
1 |
cut
-d
'"'
-f
2 |
awk
'{n=split($NF,a,"/");print a[n]}'
)
fi
if
[
"x
$TAG
"
==
"x"
]
;
then
echo
"Cannot determine latest tag."
exit
1
fi
}
...
...
@@ -100,12 +104,12 @@ downloadFile() {
HELM_SUM_FILE
=
"/tmp/
$HELM_DIST
.sha256"
echo
"Downloading
$DOWNLOAD_URL
"
if
type
"curl"
>
/dev/null
;
then
curl
-
Ls
"
$CHECKSUM_URL
"
-o
"
$HELM_SUM_FILE
"
curl
-
SsL
"
$CHECKSUM_URL
"
-o
"
$HELM_SUM_FILE
"
elif
type
"wget"
>
/dev/null
;
then
wget
-q
-O
"
$HELM_SUM_FILE
"
"
$CHECKSUM_URL
"
fi
if
type
"curl"
>
/dev/null
;
then
curl
-L
"
$DOWNLOAD_URL
"
-o
"
$HELM_TMP_FILE
"
curl
-
Ss
L
"
$DOWNLOAD_URL
"
-o
"
$HELM_TMP_FILE
"
elif
type
"wget"
>
/dev/null
;
then
wget
-q
-O
"
$HELM_TMP_FILE
"
"
$DOWNLOAD_URL
"
fi
...
...
@@ -134,7 +138,7 @@ fail_trap() {
result
=
$?
if
[
"
$result
"
!=
"0"
]
;
then
echo
"Failed to install
$PROJECT_NAME
"
echo
"
\t
For support, go to https://github.com/kubernetes/helm."
echo
-e
"
\t
For support, go to https://github.com/kubernetes/helm."
fi
exit
$result
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment