aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamruddhi Khandale <skhandale@microsoft.com>2023-04-19 00:37:51 +0300
committerGitHub <noreply@github.com>2023-04-19 00:37:51 +0300
commitfad03b19d48466bb0eec41ccbf4cc456a5c4dea7 (patch)
tree63e883beb47ac7d40dd2e2f073cd478e54c2f1a3 /src
parent2237731474ace274b1756e63937a958131cf719e (diff)
Oryx - Switch to .NET 7 (#522)feature_oryx_1.1.0
* Oryx - Switch to .NET 7 * fix test ; add test * fix test - back compat
Diffstat (limited to 'src')
-rw-r--r--src/oryx/devcontainer-feature.json5
-rwxr-xr-xsrc/oryx/install.sh16
2 files changed, 13 insertions, 8 deletions
diff --git a/src/oryx/devcontainer-feature.json b/src/oryx/devcontainer-feature.json
index 9a6bd25..66a528e 100644
--- a/src/oryx/devcontainer-feature.json
+++ b/src/oryx/devcontainer-feature.json
@@ -1,6 +1,6 @@
{
"id": "oryx",
- "version": "1.0.13",
+ "version": "1.1.0",
"name": "Oryx",
"description": "Installs the oryx CLI",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/oryx",
@@ -14,6 +14,7 @@
"PATH": "/usr/local/oryx:${PATH}"
},
"installsAfter": [
- "ghcr.io/devcontainers/features/common-utils"
+ "ghcr.io/devcontainers/features/common-utils",
+ "ghcr.io/devcontainers/features/dotnet"
]
}
diff --git a/src/oryx/install.sh b/src/oryx/install.sh
index a1b64d3..cb2e1b6 100755
--- a/src/oryx/install.sh
+++ b/src/oryx/install.sh
@@ -74,7 +74,7 @@ install_dotnet_using_apt() {
echo "Attempting to auto-install dotnet..."
install_from_microsoft_feed=false
apt_get_update
- DOTNET_INSTALLATION_PACKAGE="dotnet6"
+ DOTNET_INSTALLATION_PACKAGE="dotnet7"
apt-get -yq install $DOTNET_INSTALLATION_PACKAGE || install_from_microsoft_feed="true"
if [ "${install_from_microsoft_feed}" = "true" ]; then
@@ -82,7 +82,7 @@ install_dotnet_using_apt() {
curl -sSL ${MICROSOFT_GPG_KEYS_URI} | gpg --dearmor > /usr/share/keyrings/microsoft-archive-keyring.gpg
echo "deb [arch=${architecture} signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/microsoft-${ID}-${VERSION_CODENAME}-prod ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/microsoft.list
apt-get update -y
- DOTNET_INSTALLATION_PACKAGE="dotnet-sdk-6.0"
+ DOTNET_INSTALLATION_PACKAGE="dotnet-sdk-7.0"
DOTNET_SKIP_FIRST_TIME_EXPERIENCE="true" apt-get install -yq $DOTNET_INSTALLATION_PACKAGE
fi
@@ -132,9 +132,9 @@ if dotnet --version > /dev/null ; then
DOTNET_BINARY=$(which dotnet)
fi
-# Oryx needs to be built with .NET 6
-if [[ "${DOTNET_BINARY}" = "" ]] || [[ "$(dotnet --version)" != *"6"* ]] ; then
- echo "'dotnet 6' was not detected. Attempting to install .NET 6 to build oryx."
+# Oryx needs to be built with .NET 7
+if [[ "${DOTNET_BINARY}" = "" ]] || [[ "$(dotnet --version)" != *"7"* ]] ; then
+ echo "'dotnet 7' was not detected. Attempting to install .NET 7 to build oryx."
install_dotnet_using_apt
if ! dotnet --version > /dev/null ; then
@@ -154,7 +154,11 @@ mkdir -p ${ORYX}
git clone --depth=1 https://github.com/microsoft/Oryx $GIT_ORYX
-$GIT_ORYX/build/buildSln.sh
+SOLUTION_FILE_NAME="Oryx.sln"
+echo "Building solution '$SOLUTION_FILE_NAME'..."
+
+cd $GIT_ORYX
+${DOTNET_BINARY} build "$SOLUTION_FILE_NAME" -c Debug
${DOTNET_BINARY} publish -property:ValidateExecutableReferencesMatchSelfContained=false -r linux-x64 -o ${BUILD_SCRIPT_GENERATOR} -c Release $GIT_ORYX/src/BuildScriptGeneratorCli/BuildScriptGeneratorCli.csproj
${DOTNET_BINARY} publish -r linux-x64 -o ${BUILD_SCRIPT_GENERATOR} -c Release $GIT_ORYX/src/BuildServer/BuildServer.csproj