Skip to content

Commit 4389df6

Browse files
Add prerelease support (#81)
* add latest-including-prerelease option * fix release-status flag * refix * move prerelease to its own test because of assert * fix
1 parent cef8bdc commit 4389df6

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.circleci/test-deploy.yml

+18
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ jobs:
5252
- matlab/run-command:
5353
command: version
5454

55+
integration-test-install-latest-including-prerelease:
56+
parameters:
57+
executor:
58+
type: executor
59+
executor: <<parameters.executor>>
60+
steps:
61+
- checkout
62+
- matlab/install:
63+
release: latest-including-prerelease
64+
no-output-timeout: 30m
65+
- matlab/run-command:
66+
command: version
67+
5568
integration-test-install-release:
5669
parameters:
5770
executor:
@@ -461,6 +474,11 @@ workflows:
461474
parameters:
462475
executor: [linux, windows, macos]
463476

477+
- integration-test-install-latest-including-prerelease:
478+
matrix:
479+
parameters:
480+
executor: [linux, windows, macos]
481+
464482
- integration-test-install-release:
465483
matrix:
466484
parameters:

src/scripts/install.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,15 @@ batchdir="$tmpdir/matlab-batch"
6767
mpmdir="$tmpdir/mpm"
6868
batchbaseurl="https://ssd.mathworks.com/supportfiles/ci/matlab-batch/v1"
6969
mpmbaseurl="https://www.mathworks.com/mpm"
70+
releasestatus=""
7071

7172
# resolve release
7273
parsedrelease=$(echo "$PARAM_RELEASE" | tr '[:upper:]' '[:lower:]')
7374
if [[ "$parsedrelease" = "latest" ]]; then
7475
mpmrelease=$(stream https://ssd.mathworks.com/supportfiles/ci/matlab-release/v0/latest)
76+
elif [[ "$parsedrelease" = "latest-including-prerelease" ]]; then
77+
mpmrelease=$(stream https://ssd.mathworks.com/supportfiles/ci/matlab-release/v0/latest-including-prerelease)
78+
releasestatus="--release-status=Prerelease"
7579
else
7680
mpmrelease="$parsedrelease"
7781
fi
@@ -139,7 +143,8 @@ chmod +x "$batchdir/matlab-batch$binext"
139143
"$mpmdir/mpm$binext" install \
140144
--release="$mpmrelease" \
141145
--destination="$rootdir" \
146+
${releasestatus} \
142147
--products ${PARAM_PRODUCTS} MATLAB
143148

144149
# add MATLAB and matlab-batch to path
145-
echo 'export PATH="'$rootdir'/bin:'$batchdir':$PATH"' >> $BASH_ENV
150+
echo 'export PATH="'$rootdir'/bin:'$batchdir':$PATH"' >> $BASH_ENV

0 commit comments

Comments
 (0)