Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoInstaller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Dojo Project (HES-SO)
Projects
UI
DojoInstaller
Commits
9af0a3ae
Commit
9af0a3ae
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
Add pre-alpha installer and change method to get latest release
parent
2ef86d48
Branches
master
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installer.sh
+14
-10
14 additions, 10 deletions
installer.sh
with
14 additions
and
10 deletions
installer.sh
+
14
−
10
View file @
9af0a3ae
...
...
@@ -6,6 +6,8 @@
{
\u
nalias
command
;
\u
nset
-f
command
;
}
>
/dev/null 2>&1
tdir
=
''
gitedu_release_url
=
"https://gitedu.hesge.ch/dojo_project/projects/ui/dojocli/-/releases/Latest"
gitedu_prealpha_url
=
"https://gitedu.hesge.ch/dojo_project/projects/ui/dojocli/-/releases/Latest"
gitedu_url
=
$gitedu_release_url
cleanup_success
()
{
printf
"The dojo is installed in %s
\n
Make sure %s is in your path
\n
"
"
$dest
"
"
$dest
"
cleanup
...
...
@@ -28,7 +30,7 @@ die() {
detect_jq_tool
()
{
if
command
-v
jq 2> /dev/null
>
/dev/null
;
then
get_version
()
{
command
jq
-r
'.
["version"]
'
command
jq
-r
'.
"assets"."links"[0].url'
|
command awk
-F
'/'
'{print $(NF-1)}
'
}
else
die
"jq not available on your system cannot get dojo version"
...
...
@@ -66,7 +68,7 @@ detect_network_tool() {
command
wget
--quiet
-O-
"
$1
"
| get_version
}
else
die
"Neither curl nor wget available. Cannot download dojo. Install any of the or see
$gitedu_
release_
url
to download manually"
die
"Neither curl nor wget available. Cannot download dojo. Install any of the or see
$gitedu_url
to download manually"
fi
}
...
...
@@ -80,7 +82,7 @@ detect_os() {
aarch64
*
)
arch
=
"arm64"
;;
armv8
*
)
arch
=
"arm64"
;;
arm64
)
arch
=
"arm64"
;;
*
)
die
"dojo binaries are not available for
$(
command uname
-m
)
architecture. See
$gitedu_
release_
url
to download manually"
;;
*
)
die
"dojo binaries are not available for
$(
command uname
-m
)
architecture. See
$gitedu_url
to download manually"
;;
esac
;;
'Linux'
)
...
...
@@ -90,10 +92,10 @@ detect_os() {
aarch64
*
)
arch
=
"arm64"
;;
armv8
*
)
arch
=
"arm64"
;;
arm64
)
arch
=
"arm64"
;;
*
)
die
"dojo binaries are not available for
$(
command uname
-m
)
architecture. See
$gitedu_
release_
url
to download manually"
;;
*
)
die
"dojo binaries are not available for
$(
command uname
-m
)
architecture. See
$gitedu_url
to download manually"
;;
esac
;;
*
)
die
"dojo binaries are not available for
$(
command uname
)
. See
$gitedu_
release_
url
to download manually"
*
)
die
"dojo binaries are not available for
$(
command uname
)
. See
$gitedu_url
to download manually"
esac
}
...
...
@@ -131,20 +133,22 @@ get_file_url() {
}
get_release_url
()
{
release_version
=
$(
fetch_and_get_version_quiet https://gitedu.hesge.ch/
dojo_project/projects/ui/dojocli/-/raw/main/NodeApp/package.json
)
release_version
=
$(
fetch_and_get_version_quiet https://gitedu.hesge.ch/
api/v4/projects/12972/releases/Latest
)
[
$?
-ne
0
-o
-z
"
$release_version
"
]
&&
die
"Could not get dojo latest release version"
get_file_url
"
$release_version
"
}
get_nightly_url
()
{
die
"Error nightly not available yet"
# get_file_url "nightly" # TODO: fix for nightly
get_prealpha_url
()
{
gitedu_url
=
$gitedu_prealpha_url
prealpha_version
=
$(
fetch_and_get_version_quiet https://gitedu.hesge.ch/api/v4/projects/12972/releases/Pre-alpha
)
[
$?
-ne
0
-o
-z
"
$prealpha_version
"
]
&&
die
"Could not get dojo pre-alpha release version"
get_file_url
"
$prealpha_version
"
}
get_download_url
()
{
case
"
$installer
"
in
"
nightly"
)
get_nightly_url
;;
# TODO: add nightly capabilities
"
pre-alpha"
)
get_prealpha_url
;;
""
)
get_release_url
;;
*
)
;;
esac
...
...
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