Skip to content

Commit

Permalink
try forward slash paths in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisvang committed Nov 29, 2023
1 parent fc74b55 commit 5118617
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test-update-cycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ jobs:
if: runner.os == 'macOS'
run: echo "macOS" # TEMP
- name: add src to python path
run: Add-Content -Path $Env:GITHUB_ENV -Value "PYTHONPATH=$Env:PYTHONPATH;.\src"
run: Add-Content -Path $Env:GITHUB_ENV -Value "PYTHONPATH=$Env:PYTHONPATH;./src"
- run: $Env:PYTHONPATH
- name: initialize tufup repository
run: python repo_init.py
- name: create my_app v1.0 bundle using pyinstaller
run: cmd.exe /c .\create_pyinstaller_bundle_win.bat
run: cmd.exe /c ./create_pyinstaller_bundle_win.bat
- name: add my_app v1.0 to tufup repository
run: python repo_add_bundle.py
- name: mock install my_app v1.0
run: |
$myapp_v1_archive = ".\temp_my_app\repository\targets\my_app-1.0.tar.gz"
$myapp_install_dir = "$env:LOCALAPPDATA\Programs\my_app"
$myapp_targets_dir = "$env:LOCALAPPDATA\my_app\update_cache\targets"
$myapp_v1_archive = "./temp_my_app/repository/targets/my_app-1.0.tar.gz"
$myapp_install_dir = "$env:LOCALAPPDATA/Programs/my_app"
$myapp_targets_dir = "$env:LOCALAPPDATA/my_app/update_cache/targets"
# make install dir accessible as environment variable in subsequent steps
Add-Content -Path $Env:GITHUB_ENV -Value "MYAPP_INSTALL_DIR=$myapp_install_dir"
# create install dir and extract archive into it
Expand All @@ -73,24 +73,24 @@ jobs:
shell: python
run: |
import pathlib
settings_path = pathlib.Path('.\src\myapp\settings.py')
settings_path = pathlib.Path('./src/myapp/settings.py')
settings_text = settings_path.read_text().replace('1.0', '2.0')
settings_path.write_text(settings_text)
# - run: cat .\src\myapp\settings.py
# - run: cat ./src/myapp/settings.py
- name: create my_app v2.0 bundle using pyinstaller
run: cmd.exe /c .\create_pyinstaller_bundle_win.bat
run: cmd.exe /c ./create_pyinstaller_bundle_win.bat
- name: add my_app v2.0 to tufup repository
run: python repo_add_bundle.py
- name: run update server and update my_app from v1 to v2
run: |
python -m http.server -d .\temp_my_app\repository &
python -m http.server -d ./temp_my_app/repository &
sleep 5
Invoke-Expression "$Env:MYAPP_INSTALL_DIR\main.exe skip"
Invoke-Expression "$Env:MYAPP_INSTALL_DIR/main.exe skip"
- name: proof of the pudding (i.e. verify that install dir contains my_app v2.0)
run: |
python -m http.server -d .\temp_my_app\repository &
python -m http.server -d ./temp_my_app/repository &
sleep 5
$output = Invoke-Expression "$Env:MYAPP_INSTALL_DIR\main.exe skip"
$output = Invoke-Expression "$Env:MYAPP_INSTALL_DIR/main.exe skip"
$pattern = "my_app 2.0"
if ( $output -match $pattern ) {
Write-Output "success: $pattern found"
Expand Down

0 comments on commit 5118617

Please sign in to comment.