Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
devcontainer-features
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazydevelop-devcontainer-temp
devcontainer-features
Commits
084df810
Unverified
Commit
084df810
authored
Mar 04, 2024
by
Samruddhi Khandale
Committed by
GitHub
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oryx: Clean up additional installation of .NET (#892)
parent
025cae18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
devcontainer-feature.json
src/oryx/devcontainer-feature.json
+1
-1
install.sh
src/oryx/install.sh
+9
-5
install_dotnet_and_oryx.sh
test/oryx/install_dotnet_and_oryx.sh
+3
-0
No files found.
src/oryx/devcontainer-feature.json
View file @
084df810
{
"id"
:
"oryx"
,
"version"
:
"1.3.
0
"
,
"version"
:
"1.3.
1
"
,
"name"
:
"Oryx"
,
"description"
:
"Installs the oryx CLI"
,
"documentationURL"
:
"https://github.com/devcontainers/features/tree/main/src/oryx"
,
...
...
src/oryx/install.sh
View file @
084df810
...
...
@@ -86,7 +86,6 @@ install_dotnet_with_script()
DOTNET_BINARY
=
"dotnet"
export
PATH
=
"
${
PATH
}
:/usr/share/dotnet"
DOTNET_BINARY_INSTALLATION
=
"/usr/share/dotnet/sdk/
${
version
}
"
}
install_dotnet_using_apt
()
{
...
...
@@ -146,7 +145,6 @@ usermod -a -G oryx "${USERNAME}"
# Required to decide if we want to clean up dotnet later.
DOTNET_INSTALLATION_PACKAGE
=
""
DOTNET_BINARY_INSTALLATION
=
""
DOTNET_BINARY
=
""
if
dotnet
--version
>
/dev/null
;
then
...
...
@@ -156,6 +154,7 @@ fi
MAJOR_VERSION_ID
=
$(
echo
$(
dotnet
--version
)
|
cut
-d
.
-f
1
)
PATCH_VERSION_ID
=
$(
echo
$(
dotnet
--version
)
|
cut
-d
.
-f
3
)
PINNED_SDK_VERSION
=
""
# Oryx needs to be built with .NET 8
if
[[
"
${
DOTNET_BINARY
}
"
=
""
]]
||
[[
$MAJOR_VERSION_ID
!=
"8"
]]
||
[[
$MAJOR_VERSION_ID
=
"8"
&&
${
PATCH_VERSION_ID
}
-ge
"101"
]]
;
then
echo
"'dotnet 8' was not detected. Attempting to install .NET 8 to build oryx."
...
...
@@ -182,7 +181,7 @@ mkdir -p ${ORYX}
git clone
--depth
=
1 https://github.com/microsoft/Oryx
$GIT_ORYX
if
[[
"
${
DOTNET_BINARY_INSTALLAT
ION
}
"
!=
""
]]
;
then
if
[[
"
${
PINNED_SDK_VERS
ION
}
"
!=
""
]]
;
then
cd
$GIT_ORYX
dotnet new globaljson
--sdk-version
${
PINNED_SDK_VERSION
}
fi
...
...
@@ -234,9 +233,14 @@ if [[ "${DOTNET_INSTALLATION_PACKAGE}" != "" ]]; then
apt purge
-yq
$DOTNET_INSTALLATION_PACKAGE
fi
if
[[
"
${
DOTNET_BINARY_INSTALLAT
ION
}
"
!=
""
]]
;
then
if
[[
"
${
PINNED_SDK_VERS
ION
}
"
!=
""
]]
;
then
rm
-f
${
GIT_ORYX
}
/global.json
rm
-rf
${
DOTNET_BINARY_INSTALLATION
}
rm
-rf
/usr/share/dotnet/sdk/
$PINNED_SDK_VERSION
# Extract the major, minor version and the first digit of the patch version
MAJOR_MINOR_PATCH1_VERSION
=
${
PINNED_SDK_VERSION
%??
}
rm
-rf
/usr/share/dotnet/shared/Microsoft.NETCore.App/
$MAJOR_MINOR_PATCH1_VERSION
rm
-rf
/usr/share/dotnet/shared/Microsoft.AspNetCore.App/
$MAJOR_MINOR_PATCH1_VERSION
fi
...
...
test/oryx/install_dotnet_and_oryx.sh
View file @
084df810
...
...
@@ -5,6 +5,9 @@ set -e
# Optional: Import test library
source
dev-container-features-test-lib
# Runtimes are listed twice due to 'Microsoft.NETCore.App' and 'Microsoft.AspNetCore.App'
check
"two versions of dotnet runtimes are present"
bash
-c
"[
$(
dotnet
--list-runtimes
|
wc
-l
)
-eq 4 ]"
check
"Oryx version"
oryx
--version
check
"Dotnet is not removed if it is not installed by the Oryx Feature"
dotnet
--version
...
...
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