Skip to content

Commit

Permalink
Merge branch 'main' into al/setup-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alianides committed Jun 18, 2024
2 parents b753bcf + aca7f83 commit 0fddda2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
27 changes: 24 additions & 3 deletions .devcontainer/features/spacefx-dev/postStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,25 @@ run_a_script "touch /spacefx-dev/postStart.start"
STAGE_SPACE_FX_CMD_EXTRAS=""


############################################################
# Install Dotnet
############################################################
function check_and_install_dotnet(){
info_log "START: ${FUNCNAME[0]}"

info_log "Checking for dotnet ('${DOTNET_INSTALL_DIR:?}/dotnet')..."
if [[ ! -f "${DOTNET_INSTALL_DIR:?}/dotnet" ]]; then
info_log "...dotnet not found. Downloading..."
run_a_script "wget -P /tmp -q https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh" --disable_log
run_a_script "chmod +x /tmp/dotnet-install.sh" --disable_log
run_a_script "/tmp/dotnet-install.sh --version ${DOTNET_SDK_VERSION:?}" --disable_log
fi

info_log "...dotnet found at '${DOTNET_INSTALL_DIR:?}/dotnet'"

info_log "END: ${FUNCNAME[0]}"
}

############################################################
# Install VSDebugger
############################################################
Expand Down Expand Up @@ -72,7 +91,7 @@ function add_spacedev_nuget_source(){

create_directory "${SPACEFX_DIR}/nuget"

run_a_script "dotnet nuget list source" current_nuget_sources
run_a_script "${DOTNET_INSTALL_DIR:?}/dotnet nuget list source" current_nuget_sources

if [[ $current_nuget_sources == *"${SPACEFX_DIR}/nuget"* ]]; then
info_log "found nuget source '${SPACEFX_DIR}/nuget'. Nothing to do."
Expand All @@ -81,7 +100,7 @@ function add_spacedev_nuget_source(){
fi

info_log "Adding '${SPACEFX_DIR}/nuget' as a nuget source..."
run_a_script "dotnet nuget add source ${SPACEFX_DIR}/nuget"
run_a_script "${DOTNET_INSTALL_DIR:?}/dotnet nuget add source ${SPACEFX_DIR}/nuget"
info_log "...successfully added '${SPACEFX_DIR}/nuget'"


Expand Down Expand Up @@ -300,13 +319,15 @@ SPACEFX_UPDATE_END" --disable_log
}

function main() {
check_and_install_dotnet
check_and_install_vsdebugger

add_spacedev_nuget_source
wipe_bin_and_obj_directories

if [[ "${CLUSTER_ENABLED}" == true ]] && [[ "${DEBUG_SHIM_ENABLED}" == true ]]; then
[[ ! -d "${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev" ]] && run_a_script "mkdir -p ${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev" --disable_log
[[ ! -f "${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev/debugShim_keepAlive.sh" ]] && run_a_script "cp /spacefx-dev/debugShim_keepAlive.sh ${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev/debugShim_keepAlive.sh" --disable_log
check_and_install_vsdebugger
generate_debugshims
# run_user_requested_yamls
fi
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ oras push ${REGISTRY}/${FEATURE}:${VERSION} \
```



## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Expand Down
11 changes: 11 additions & 0 deletions modules/m_100_collect_container_info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ export CONTAINER_WORKING_DIR=${CONTAINER_WORKING_DIR}
SPACEFX_UPDATE_END" --disable_log
fi

# Check and add the dotnet install dir to the app.env file
if [[ "$_spacefx_dev_env" != *"DOTNET_INSTALL_DIR"* ]]; then
run_a_script "tee -a ${SPACEFX_DEV_ENV} > /dev/null << SPACEFX_UPDATE_END
export DOTNET_INSTALL_DIR=${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev/dotnet
SPACEFX_UPDATE_END" --disable_log
export DOTNET_INSTALL_DIR=${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev/dotnet
export PATH="${CONTAINER_WORKING_DIR:?}/.git/spacefx-dev/dotnet:${PATH}"
fi




}

Expand Down

0 comments on commit 0fddda2

Please sign in to comment.