Skip to content

Commit 332c204

Browse files
committed
Make sure platform is correct for packaging env
When archiving the environments, we get the platform from the conda environment, so we need it to be the correct platform. This only currently applies when building for osx-64 an a osx-arm64 machine.
1 parent 7a11aae commit 332c204

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

buildconfig/Jenkins/Conda/mamba-utils

+5-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ setup_mamba () {
2020
source $install_prefix/etc/profile.d/mamba.sh
2121

2222
if [ -n "$env_name" ]; then
23-
create_and_activate_env "$env_name"
23+
create_and_activate_env "$env_name" "$platform"
2424
fi
2525
}
2626

@@ -34,6 +34,10 @@ create_and_activate_env() {
3434
local conda_subdir_str=$2
3535
CONDA_SUBDIR=$conda_subdir_str mamba create --yes --name $env_name
3636
mamba activate $env_name
37+
38+
if [[ -n "$conda_subdir_str" ]]; then
39+
conda config --env --set subdir "$conda_subdir_str"
40+
fi
3741
}
3842

3943
# Build the mantid-developer metapackage from source and
@@ -53,10 +57,5 @@ create_and_activate_mantid_developer_env() {
5357

5458
$SCRIPT_DIR/package-conda "$packaging_dir" --build-mantid-developer --platform "$platform"
5559
create_and_activate_env mantid-developer "$platform"
56-
57-
if [[ -n "$platform" ]]; then
58-
conda config --env --set subdir "$platform"
59-
fi
60-
6160
mamba install -c "$packaging_dir"/conda-bld mantid-developer --yes
6261
}

0 commit comments

Comments
 (0)