Skip to content

Commit 389e7d1

Browse files
committed
Merge branch 'version/0-47-1-RC1' into mitchell/dx-3228-4
2 parents a83b45c + 5b0c39c commit 389e7d1

File tree

5 files changed

+45
-4
lines changed

5 files changed

+45
-4
lines changed

.github/workflows/build.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- # === Install State Tool ===
8282
name: Install State Tool
8383
uses: ActiveState/setup-state-tool@v1
84-
if: "!contains(matrix.sys.os, 'arm')"
84+
if: "!contains(matrix.sys.os, 'arm') && runner.os != 'Windows'"
8585

8686
- # === Install State Tool (ARM64) ===
8787
name: Install State Tool (ARM64)
@@ -92,6 +92,15 @@ jobs:
9292
echo "$HOME/.local/ActiveState/StateTool/beta/bin" >> $GITHUB_PATH
9393
"$HOME/.local/ActiveState/StateTool/beta/bin/state" config set optin.unstable true
9494
95+
- # === Install State Tool (Windows) ===
96+
name: Install State Tool (Windows)
97+
if: runner.os == 'Windows'
98+
shell: pwsh
99+
run: |
100+
Invoke-Expression -Command ".\installers\install.ps1 -n"
101+
echo "$env:LOCALAPPDATA\ActiveState\StateTool\release\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
102+
Invoke-Expression "$env:LOCALAPPDATA\ActiveState\StateTool\release\bin\state config set optin.unstable true"
103+
95104
- # === Setup ===
96105
name: Setup
97106
shell: bash

activestate.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ scripts:
8181
- name: install-deps-ci
8282
language: bash
8383
standalone: true
84-
if: ne .Shell "cmd"
8584
value: |
8685
if { [[ "$GOOS" == "windows" ]] || [[ "$OS" == "Windows_NT" ]]; } && ! type "goversioninfo" &> /dev/null; then
8786
echo "goversioninfo was not found on your PATH. Installing .."

installers/install.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function setShellOverride
154154
$currentPid = $PID
155155
while ($currentPid -ne 0)
156156
{
157-
$process = Get-WmiObject Win32_Process | Where-Object { $_.ProcessId -eq $currentPid }
157+
$process = Get-CimInstance Win32_Process | Where-Object { $_.ProcessId -eq $currentPid }
158158
if (!$process) { break }
159159

160160
if ($process.Name -eq "cmd" -or $process.Name -eq "cmd.exe")

test/integration/checkout_int_test.go

+33
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,39 @@ func (suite *CheckoutIntegrationTestSuite) TestCheckoutFromArchive() {
395395
cp.ExpectExitCode(0)
396396
}
397397

398+
func (suite *CheckoutIntegrationTestSuite) TestCheckoutPortable() {
399+
suite.OnlyRunForTags(tagsuite.Checkout)
400+
ts := e2e.New(suite.T(), false)
401+
defer ts.Close()
402+
403+
// Checkout a working runtime.
404+
cp := ts.Spawn("checkout", "ActiveState-CLI/small-python#fb513fe6-b9f4-4c54-adf3-8a7833b290f3", ".", "--portable")
405+
cp.Expect("Checked out project")
406+
cp.ExpectExitCode(0)
407+
408+
// Remove the artifact depot.
409+
suite.Require().NoError(os.RemoveAll(filepath.Join(ts.Dirs.Cache, "depot")))
410+
411+
// Verify the runtime still works because its contents are copies, not links.
412+
proj, err := project.FromPath(ts.Dirs.Work)
413+
suite.Require().NoError(err)
414+
targetDir := filepath.Join(ts.Dirs.Cache, runtime_helpers.DirNameFromProjectDir(proj.Dir()))
415+
pythonExe := filepath.Join(rt.ExecutorsPath(targetDir), "python3"+osutils.ExeExtension)
416+
cp = ts.SpawnCmd(pythonExe, "--version")
417+
cp.Expect("Python 3")
418+
cp.ExpectExitCode(0)
419+
420+
// Verify there are no symlinks in the runtime.
421+
files, err := fileutils.ListDir(targetDir, true)
422+
suite.Require().NoError(err)
423+
for _, file := range files {
424+
path := filepath.Join(targetDir, file.Name())
425+
resolvedPath, err := fileutils.ResolvePath(path)
426+
suite.Require().NoError(err)
427+
suite.Assert().NotContains(resolvedPath, "depot", "runtime file '%s' should not be linked to the depot", file.Name())
428+
}
429+
}
430+
398431
func TestCheckoutIntegrationTestSuite(t *testing.T) {
399432
suite.Run(t, new(CheckoutIntegrationTestSuite))
400433
}

version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.48.0-RC1
1+
0.48.0-RC1

0 commit comments

Comments
 (0)