good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf-tenderly
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
a
asdf-tenderly
Commits
3e640188
Commit
3e640188
authored
2 years ago
by
a
Browse files
Options
Downloads
Patches
Plain Diff
plugin done
parent
9fb30b0e
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/install
+21
-22
21 additions, 22 deletions
bin/install
with
21 additions
and
22 deletions
bin/install
+
21
−
22
View file @
3e640188
#!/usr/bin/env bash
set
-e
set
-e
u
set
-o
pipefail
install_tenderly
()
{
...
...
@@ -12,14 +12,14 @@ install_tenderly() {
local
-r
binary_path
=
"
${
bin_install_path
}
/tenderly"
local
platform
local arch
local
u
arch
local
download_url
local
download_path
arch
=
$(
get_arch
)
u
arch
=
$(
get_
u
arch
)
platform
=
$(
get_platform
)
download_url
=
$(
get_download_url
"
$version
"
"
$platform
"
,
"
$arch
"
)
download_path
=
"
${
tmp_download_dir
}
"
/
$(
get_filename
"
$version
"
"
$platform
"
"
$arch
"
)
download_url
=
$(
get_download_url
"
$version
"
"
$platform
"
"
$
u
arch
"
)
download_path
=
"
${
tmp_download_dir
}
"
/
$(
get_filename
"
$version
"
"
$platform
"
"
$
u
arch
"
)
echo
"Downloading tenderly from
${
download_url
}
"
curl
-Lo
"
${
download_path
}
"
"
${
download_url
}
"
...
...
@@ -42,42 +42,41 @@ get_platform() {
uname
|
tr
'[:upper:]'
'[:lower:]'
}
get_arch
()
{
local arch
=
""
local
arch_check
=
${
ASDF_
GOLANG
_OVERWRITE_
ARCH
:-
"
$(
uname
-m
)
"
}
case
"
${
arch_check
}
"
in
x86_64|amd64
)
arch
=
"amd64"
;
;;
i686|i386|386
)
arch
=
"386"
;
;;
armv6l|armv7l
)
arch
=
"armv6l"
;
;;
aarch64|arm64
)
arch
=
"arm64"
;
;;
ppc64le
)
arch
=
"ppc64le"
;
;;
get_
u
arch
()
{
local
u
arch
=
""
local
u
arch_check
=
${
ASDF_
TENDERLY
_OVERWRITE_
uarch
:-
"
$(
uname
-m
)
"
}
case
"
${
u
arch_check
}
"
in
x86_64|amd64
)
u
arch
=
"amd64"
;
;;
i686|i386|386
)
u
arch
=
"386"
;
;;
armv6l|armv7l
)
u
arch
=
"armv6l"
;
;;
a
u
arch64|arm64
)
u
arch
=
"arm64"
;
;;
ppc64le
)
u
arch
=
"ppc64le"
;
;;
*
)
fail
"
A
rch '
${
arch_check
}
' not supported!"
fail
"
ua
rch '
${
u
arch_check
}
' not supported!"
;;
esac
printf
"%s"
"
$arch
"
printf
"%s"
"
$
u
arch
"
}
get_filename
()
{
local
-r
version
=
$1
local
-r
platform
=
$2
local
-r
arch
=
$3
local
-r
u
arch
=
$3
echo
"tenderly
-
${
version
}
-
${
platform
}
-
${
arch
}
.tar.gz"
echo
"tenderly
_
${
version
}
_
${
platform
}
_
${
u
arch
}
.tar.gz"
}
get_download_url
()
{
local
-r
version
=
$1
local
-r
platform
=
$2
local
-r
arch
=
$3
local
-r
u
arch
=
$3
local
filename
filename
=
$(
get_filename
"
$version
"
"
$platform
"
"
$arch
"
)
filename
=
$(
get_filename
"
$version
"
"
$platform
"
"
$
u
arch
"
)
echo
"https://github.com/Tenderly/tenderly-cli/releases/download/v
${
version
}
/
${
filename
}
"
}
# probably should verify ASDF_INSTALL_VERSION is 1.21.1+
tmp_download_dir
=
"
$(
mktemp
-d
-t
'asdf_XXXXXXXX'
)
"
trap
'rm -rf "${tmp_download_dir}"'
EXIT
install_tenderly
"
${
ASDF_INSTALL_TYPE
}
"
"
${
ASDF_INSTALL_VERSION
}
"
"
${
ASDF_INSTALL_PATH
}
"
"
$tmp_download_dir
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment