Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor PhLImageProcess creation and fix date conversion (from ps) on mac os #1

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
84e238e
upload only if in dev branch
demarey Apr 12, 2022
5523caf
upload artifacts on release
demarey Apr 13, 2022
1a82a74
Revert "temporary change of moose images location"
demarey Jan 18, 2022
36ceb76
fix sources.list
demarey Apr 14, 2022
bf148c8
restore proxy authentication settings. Fixes #358
demarey Apr 15, 2022
bb02a41
Set title of About dialog. Fixes #550.
demarey Apr 15, 2022
25e4f18
Better display of download error messages. Fixes #549
demarey Apr 15, 2022
d855e4f
Add Http error message to PhLDownload error
demarey Apr 15, 2022
6fb0a65
showError expects an error as argument and not a string
demarey Apr 15, 2022
b04755a
fix moose download urls
demarey Apr 15, 2022
ce01dd4
update Win files list for the installer
demarey Apr 25, 2022
dbca063
fix #551 'show folder on windows'
demarey Apr 25, 2022
ce3bb74
Update Moose sources (#557)
ClotildeToullec May 6, 2022
efa21d9
Display image name as window title when PL not deployed
demarey May 9, 2022
224edc0
add missing description in PhLCorruptedTemplateError
demarey May 9, 2022
92cf1a5
Do not instantiate a new PharoLauncherApplication when opening the app
demarey Jun 3, 2022
dfadffa
ensure there are no launcher files before testing
demarey Jun 3, 2022
9dabd4a
Remove unnecessary complex code and test to now simply #openInOSFileB…
astares Jun 9, 2022
13b8fde
Use "Show" when no image is downloaded yet gives error (#571)
astares Jun 9, 2022
4fce11a
fix PhLShowImageInFolderCommandTest test
demarey Jun 10, 2022
757db84
Update create-images.md (#580)
cminter Aug 11, 2022
8279a30
fixes #585
demarey Dec 21, 2022
ae8d89f
upload portable win zip to files.pharo.org
demarey Jan 25, 2023
1508c3a
add missing key bindings.
demarey Jan 27, 2023
9dbe6eb
Delete PharoLAuncher morph when entering development mode + restore m…
demarey Jan 27, 2023
1d8a54a
set default theme in preferences and do not "force" one
demarey Jan 27, 2023
d8b65eb
Do not redraw the full app when theme changed but instead configure a…
demarey Jan 30, 2023
91aaa06
make rubtextfield react to theme change.
demarey Jan 30, 2023
878d4f3
prepare Pharo 11 release
demarey Mar 1, 2023
4a48ae9
ensure the number of images deleted will be visible in the notification
demarey Mar 1, 2023
ed17e07
typo
demarey Mar 1, 2023
1cf9d2e
launch image right after its creation
demarey Mar 24, 2023
e11a96e
fix tests
demarey Mar 24, 2023
3b27ab2
Updated Pharo launcher screenshot, fixed CI badges
Bajger Apr 4, 2023
f4ac3ae
Merge pull request #603 from Bajger/596-Update-the-photos-of-the-READ…
demarey Apr 4, 2023
a4d0e89
Fixed default development branch name
Bajger Apr 6, 2023
9b21a10
Merge pull request #606 from Bajger/fix-default-branch-name-dev
Bajger Apr 6, 2023
5780dd7
Added general progress bar, allowing stacking of jobs.
Bajger Apr 12, 2023
dc97a07
Fixed inproper use of SpConfirmDialog method, causing DNU
Bajger Apr 12, 2023
ca00c37
Merge pull request #608 from Bajger/595-General-progress-bar
demarey Apr 13, 2023
09d6e2d
remove code now integrated in Pharo 11
demarey Apr 18, 2023
2a44ad3
New sources for Moose
ClotildeToullec Apr 28, 2023
252ad58
Correct pharo image numbers
ClotildeToullec Apr 28, 2023
32194cc
Merge pull request #611 from ClotildeToullec/dev
MarcusDenker Apr 28, 2023
385628a
Pharo 12 stable, remove moose and pharo-contrib jenkins
demarey May 11, 2023
e0ad53c
remove OSWorldRenderer>>#doActivate overide
demarey May 24, 2023
6cf6785
set 'Pharo Launcher' as window title
demarey Jun 1, 2023
109bea3
add github action to test the project
demarey Jun 30, 2023
0ea7224
add test-report
demarey Jun 30, 2023
e469f46
test test publication
demarey Jun 30, 2023
4a7846e
user packaging
demarey Jun 30, 2023
97b4e83
add linux packaging
demarey Jul 7, 2023
4848658
add windows packaging
demarey Jul 7, 2023
a54b0f4
use advinst automation
demarey Jul 10, 2023
b6f5096
add mac os packaging
demarey Jul 12, 2023
97e5d2b
build mac arm64
demarey Jul 13, 2023
71ed489
add release workflow
demarey Jul 13, 2023
35c637f
some fixes
demarey Aug 7, 2023
04b7df4
add publication step in same workflow
demarey Aug 8, 2023
b9aaf4a
fix image name
demarey Aug 8, 2023
11551cb
fix command availibility on unix
demarey Aug 9, 2023
dd0c878
cleanup
demarey Aug 9, 2023
41e0c62
increase time limit to avoid timeout
demarey Aug 9, 2023
8a10a60
fail on test error
demarey Aug 9, 2023
a1e81b5
Merge pull request #621 from pharo-project/feature/gh
demarey Aug 10, 2023
0ad33cd
update CI links and badges
demarey Aug 10, 2023
4589c6c
get zip archives
demarey Aug 11, 2023
65b931c
Merge branch 'dev' into feature/cmd-line
demarey Aug 24, 2023
0a09aac
fix tests
demarey Aug 24, 2023
b5c6a01
copy cli launcher script in app
demarey Aug 24, 2023
6bd8e22
Rename #shouldRun setting name
demarey Aug 28, 2023
12a48b1
Do not store #developmentEnvironmentEnabled setting
demarey Aug 28, 2023
2688700
Do not write sources file to disk during tests remove debug
demarey Aug 29, 2023
c661cf8
Do not run template sources update checker when in CLI mode.
demarey Aug 29, 2023
9134280
Do not open Pharo Launcher UI at startup when in interactive mode
demarey Aug 30, 2023
a299229
Do not initialise Ombu when deployed (uses networks name resolution t…
demarey Aug 30, 2023
286d9e5
Small shell changes from bash linter checks
Sep 19, 2023
bb37494
Merge pull request #628 from hernanmd/minor-shell-enhacements
demarey Sep 20, 2023
9d45852
Update README.md
hernanmd Sep 25, 2023
2d47ed8
Do noit terminate Image description updater process if already termin…
demarey Sep 25, 2023
3caf8e7
Removed unavailable Moose images
ClotildeToullec Sep 29, 2023
a505f59
Renamed Moose 11 image
ClotildeToullec Sep 29, 2023
dc0724d
Merge pull request #633 from ClotildeToullec/dev
demarey Oct 2, 2023
3a53306
cleanup
demarey Oct 16, 2023
e6aba68
initialize Pharo launcher CLI model from configuration
demarey Oct 16, 2023
019471b
remove unused PharoLauncherModel
demarey Oct 16, 2023
b2abc11
Do not use PharoLauncherApplication instance when in CLI mode.
demarey Oct 16, 2023
87a1460
do not log information on error stream
demarey Oct 16, 2023
c15bd7d
fix test
demarey Oct 16, 2023
1408328
fix default PharoLauncherApplication initialization
demarey Oct 18, 2023
64288ff
use #reset already defined in SpApplication and implement the same me…
demarey Oct 18, 2023
9dc59d3
use official clap repository
demarey Nov 7, 2023
770d6dc
use Pharo 11
demarey Nov 9, 2023
9aa544b
Do not try to guess image pharo version. Too unreliable.
demarey Jan 5, 2024
4c9347e
open a presenter to fix pharo version
demarey Jan 9, 2024
083fc98
Set log level to error
demarey Jan 11, 2024
d215396
fix detection of cmd line Vs interactive mode
demarey Jan 11, 2024
2953d06
fix window title and icon
demarey Jan 12, 2024
3ff6afa
Merge branch 'dev' into feature/cmd-line
demarey Jan 12, 2024
7308946
fix template listing in CLI mode
demarey Jan 12, 2024
ee89945
fix PR artifacts url
demarey Jan 12, 2024
11c3465
fix wrong VM path in linux packaging
demarey Jan 16, 2024
f894139
tar linux artifact to avoid executable permission loss
demarey Jan 16, 2024
e3f5848
move PhlErrorDialogPresenter in PharoLancher-Spec2 package
demarey Jan 16, 2024
42c1880
remove obsolete documentation
demarey Jan 16, 2024
b0f2628
Added exception handling for creating directory in package command
Bajger Jan 17, 2024
fb87ddc
Added version flag to launcher command.
Bajger Jan 17, 2024
5660835
remove useless method
demarey Jan 18, 2024
be7a011
launch image after its creation.
demarey Jan 18, 2024
eef319b
Merge branch 'dev' of https://github.com/pharo-project/pharo-launcher…
demarey Jan 18, 2024
a7f7132
remove dead code
demarey Jan 18, 2024
7d3346e
Add a 'no-launch' flag to creat image commands.
demarey Jan 18, 2024
d5ed943
do not launch image when creating an image in test setup
demarey Jan 18, 2024
ef2c9db
Allow to define a short name on templates and create an image from th…
demarey Jan 19, 2024
9fe7105
Improved regex validation of GH repository names. (#649)
Bajger Jan 19, 2024
be67190
add documentation build workflow
demarey Jan 23, 2024
b0fe6a3
rename docs into doc
demarey Jan 23, 2024
cf5f954
run pharo-launcher CLI without preferences
demarey Jan 23, 2024
d4b932d
Allow fast creation of dev images.
demarey Jan 24, 2024
614f978
rename name flag of list image command to nameFilter for better meani…
demarey Jan 24, 2024
befb732
update doc
demarey Jan 24, 2024
35c9a42
sort images by last modification (CLI).
demarey Jan 24, 2024
01062a0
better test assertion
demarey Jan 24, 2024
0ede2e7
archive generated doc if not deployed
demarey Jan 25, 2024
a369c75
allow deployment of doc to gh pages
demarey Jan 25, 2024
c8f005f
make test non flaky
demarey Jan 25, 2024
e2eb5da
Merge pull request #632 from hernanmd/dev
demarey Jan 26, 2024
28cf313
reorganize commands related to processes.
demarey Jan 26, 2024
37d8146
fixes #661
demarey Jan 26, 2024
c728c47
fix doc of process commands
demarey Jan 29, 2024
0aadd79
Allow to use dev or stable as default image.
demarey Jan 29, 2024
67f146b
enhance temp var names
demarey Jan 31, 2024
9111e06
Mark default value in template and category listing. Fixes #663
demarey Jan 31, 2024
30630a6
Update regex filter pattern to match href with Pharo-12 optionally fo…
Jan 31, 2024
f736665
test new regex for Pharo 12
demarey Feb 1, 2024
b1ccb0f
Merge pull request #1 from pharo-project/enh/pr-670
hernanmd Feb 1, 2024
7e47b2f
Update sources.list
hernanmd Feb 1, 2024
d4284cc
Merge pull request #670 from hernanmd/dev
demarey Feb 1, 2024
65b6af2
Merge branch 'dev' into 616-Print-image-process-list-in-nice-formatte…
demarey Feb 2, 2024
3e43157
merge PhLImageProcessListCliCommand into PhLProcessListCliCommand
demarey Feb 2, 2024
c773188
refactor PhLImageProcess creation and fix date conversion (from ps) o…
demarey Feb 2, 2024
6883559
Merge remote-tracking branch 'Bajger/616-Print-image-process-list-in-…
demarey Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 256 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
branches:
- '**'
tags:
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
# Allows you to reuse this workflow from another one
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
PHARO: 110
ARCHITECTURE: 64
VM: vm
isRelease: ${{ startsWith(github.ref, 'refs/tags/') }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set environment
run: |
echo GITHUB_REF_NAME = ${GITHUB_REF_NAME}
echo GITHUB_SHA = ${GITHUB_SHA}
echo isRelease = ${{ env.isRelease }}
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
SHORT_SHA=$(git rev-parse --short HEAD)
echo SHORT_SHA = $SHORT_SHA
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
case ${{ env.isRelease }} in
(true) export LAUNCHER_VERSION="$(git describe --tags --always)";;
(false) export LAUNCHER_VERSION=$SHORT_SHA;;
*) echo "${{ env.isRelease }}";;
esac
echo "LAUNCHER_VERSION=$LAUNCHER_VERSION" >> $GITHUB_ENV
echo LAUNCHER_VERSION = $LAUNCHER_VERSION
if [ '${{ env.ARCHITECTURE }}' = '64' ]; then
export FILE_NAME_ARCH_SUFFIX='x64'
fi
echo "FILE_NAME_ARCH_SUFFIX=$FILE_NAME_ARCH_SUFFIX" >> $GITHUB_ENV
echo FILE_NAME_ARCH_SUFFIX = $FILE_NAME_ARCH_SUFFIX

- name: Build and test
run: |
VERSION=${SHORT_SHA} ./build.sh prepare
VERSION=${SHORT_SHA} ./build.sh test

- uses: actions/upload-artifact@v3 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: ./*.xml

- name: Test report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Pharo Launcher Tests # Name of the check run which will be created
path: ./*.xml # Path to test results
reporter: java-junit # Format of test results

- name: Make Pharo Launcher deployed
run: ./build.sh make-deployed

- uses: actions/upload-artifact@v3
with:
name: packaging-user
path: |
PharoLauncher.image
PharoLauncher.changes
Pharo*.sources

- name: Linux packaging
run: VERSION=${LAUNCHER_VERSION} ./build.sh linux-package

- uses: actions/upload-artifact@v3
with:
name: PharoLauncher-linux-${{ env.LAUNCHER_VERSION }}-${{ env.FILE_NAME_ARCH_SUFFIX }}
path: pharo-launcher-linux.tar

outputs:
launcherVersion: ${{ env.LAUNCHER_VERSION }}

win-package:
name: Windows packaging
needs: build
runs-on: windows-latest
env:
PACKAGE_DIR: windows\pharo-launcher-win

steps:
- name: Compute Installer version
shell: bash
run: |
# VERSION cannot be a string in Advanced Installer. Let's use 0.0.0 for bleeding edge versions
installerVersion=0.0.0
if [ "${{ env.isRelease }}" = true ] ; then
# only get version number, not arch
# uses bash parameter expansion using a pattern.
# see https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
# and https://tldp.org/LDP/abs/html/string-manipulation.html
installerVersion=${{ needs.build.outputs.launcherVersion }}
installerVersion=${installerVersion%-*}
fi
echo installerVersion = $installerVersion
echo "INSTALLER_VERSION=$installerVersion" >> $GITHUB_ENV

- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Prepare files
shell: pwsh
run: |
Invoke-WebRequest -OutFile pharo-win-stable-signed.zip -Uri http://files.pharo.org/get-files/${{ env.PHARO }}/pharo-win-stable-signed.zip
Expand-Archive -LiteralPath .\pharo-win-stable-signed.zip -DestinationPath $Env:PACKAGE_DIR
$Env:IMAGES_DIR = "${Env:PACKAGE_DIR}\images"
mkdir "$Env:IMAGES_DIR"
Invoke-WebRequest -OutFile ${Env:IMAGES_DIR}\pharo-stable.zip -Uri https://files.pharo.org/image/stable/stable-64.zip

- uses: actions/download-artifact@v3
with:
name: packaging-user
path: ${{ env.PACKAGE_DIR }}

- name: Display structure of files to package
run: Get-ChildItem -Recurse ${{ env.PACKAGE_DIR }}

- uses: actions/upload-artifact@v3
with:
name: PharoLauncher-windows-${{ needs.build.outputs.launcherVersion }}
path: ${{ env.PACKAGE_DIR }}

- name: Build Advanced Installer Project
uses: caphyon/[email protected]
with:
advinst-version: '20.9.1'
advinst-enable-automation: 'true'

# See https://www.advancedinstaller.com/user-guide/tutorial-powershell-commands-installation.html for more details
- name: Build setup using Advinst Powershell Automation
shell: pwsh
run: |
$advinst = New-Object -ComObject AdvancedInstaller
$project = $advinst.CreateProjects("simple")
$project.ProductDetails.Name = “Pharo Launcher”
$project.ProductDetails.Publisher= “Pharo project”
$project.ProductDetails.Version= “${{ env.INSTALLER_VERSION }}”
$Env:PHARO_LAUNCHER_ICON = "${{ github.workspace }}\icons\pharo-launcher.ico"
$project.ProductDetails.SetIcon($Env:PHARO_LAUNCHER_ICON)
$project.InstallParameters.ApplicationFolder = "[LocalAppDataFolder]\[ProductName]"

$project.FilesComponent.AddFolderContents(“appdir”, “${{ github.workspace }}\${{ env.PACKAGE_DIR }}”)
$project.FilesComponent.Files

$project.ShortcutsComponent.CreateFileShortcutS("desktopfolder", "appdir\Pharo.exe")
$project.ShortcutsComponent.CreateFileShortcutS("programmenufolder", "appdir\Pharo.exe")
$project.ShortcutsComponent.CreateFileShortcutS($project.PredefinedFolders.ShortcutFolder.FullPath, "appdir\Pharo.exe")
for ($index = 0 ; $index -le 2 ; $index++) {
$shortcut = $project.ShortcutsComponent.Shortcuts[$index]
$shortcut.Icon($Env:PHARO_LAUNCHER_ICON)
$shortcut.Name = 'Pharo Launcher'
$shortcut.Arguments = 'PharoLauncher.image'
}

$outputFolder = "${{ github.workspace }}\setup";
$defaultBuild = $project.BuildComponent.Builds[0];
$defaultBuild.OutputFolder = $outputFolder

$projectFile = "${{ github.workspace }}\pharo-launcher-${{ needs.build.outputs.launcherVersion }}.aip"
$project.SaveAs($projectFile)
get-content $projectFile
$project.Build()

- uses: actions/upload-artifact@v3
with:
name: PharoLauncher-windows-installer-${{ needs.build.outputs.launcherVersion }}
path: setup/pharo-launcher*.msi

mac-package:
name: Mac OS packaging
needs: build
runs-on: macos-latest
env:
RESOURCES_DIR: PharoLauncher.app/Contents/Resources
strategy:
matrix:
arch: [64, arm64]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/download-artifact@v3
with:
name: packaging-user
path: ${{ env.RESOURCES_DIR }}

- name: Build ${{ matrix.arch }} mac os package
run: ARCHITECTURE=${{ matrix.arch }} VERSION=${{ needs.build.outputs.launcherVersion }} ./build.sh mac-package

- uses: actions/upload-artifact@v3
with:
name: PharoLauncher-mac-installer-${{ needs.build.outputs.launcherVersion }}-${{ matrix.arch == '64' && 'x64' || matrix.arch }}
path: PharoLauncher-*.dmg

publish:
runs-on: ubuntu-latest
needs: [ build, mac-package, win-package ]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artefacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Prepare upload
run: |
LINUX_PKG_NAME=$(echo artifacts/PharoLauncher-linux-${{ needs.build.outputs.launcherVersion }}-*)
echo LINUX_PKG_NAME = $LINUX_PKG_NAME
zip -q -r -9 $LINUX_PKG_NAME.zip $LINUX_PKG_NAME
WINDOWS_PKG_NAME=$(echo artifacts/PharoLauncher-windows-${{ needs.build.outputs.launcherVersion }})
echo WINDOWS_PKG_NAME = $WINDOWS_PKG_NAME
zip -q -r -9 $WINDOWS_PKG_NAME.zip $WINDOWS_PKG_NAME
ls -R .

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
**/*.msi
**/*.dmg
artifacts/*.zip
body: |
Warning: Release artefacts below are not signed nor notarized and by consequence, are not recognized as safe by Operating Systems.
You can still use them but the prefered way is to download signed and notarized installers from https://pharo.org/download
29 changes: 29 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: documentation
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
deploy-to-gh-pages:
type: boolean
description: Deploy the documentation built with mkdocs to GitHub pages?

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs

- run: mkdocs build
if: github.event.inputs.deploy-to-gh-pages == 'false'
- uses: actions/upload-artifact@v3
with:
name: pharo-launcher-documentation
path: site
if: github.event.inputs.deploy-to-gh-pages == 'false'

- run: mkdocs gh-deploy
if: github.event.inputs.deploy-to-gh-pages == 'true'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ site/
*.html

*.swp

.DS_Store
35 changes: 28 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def buildArchitecture(architecture, pharoVersion) {
}
} */
archiveArtifacts artifacts: 'pharo-launcher-*.msi, Pharo-win.zip', fingerprint: true
stash includes: 'pharo-launcher-*.msi', name: "pharo-launcher-win-${architecture}-package"
stash includes: 'pharo-launcher-*.msi, Pharo-win.zip', name: "pharo-launcher-win-${architecture}-package"
}
}
}
Expand Down Expand Up @@ -96,6 +96,7 @@ def buildArchitecture(architecture, pharoVersion) {
if (isNotArm64Architecure()) {
unstash "pharo-launcher-win-${architecture}-package"
upload('pharo-launcher-*.msi', uploadDirectoryName())
upload('Pharo-win.zip', uploadDirectoryName())
}
unstash "pharo-launcher-osx-${architecture}-package"
fileToUpload = 'PharoLauncher*-' + fileNameArchSuffix(architecture) + '.dmg'
Expand Down Expand Up @@ -123,9 +124,7 @@ def notifyBuild() {
}

def cleanUploadFolderIfNeeded(launcherVersion) {
if (isPullRequest()) {
//Only upload files if not in a PR (i.e., CHANGE_ID not empty)
echo "[DO NO UPLOAD] In PR " + (env.CHANGE_ID?.trim())
if (shouldNotUpload()) {
return;
}

Expand Down Expand Up @@ -159,9 +158,7 @@ def finalizeUpload(launcherVersion) {
}

def upload(file, launcherVersion) {
if (isPullRequest()) {
//Only upload files if not in a PR (i.e., CHANGE_ID not empty)
echo "[DO NO UPLOAD] In PR " + (env.CHANGE_ID?.trim())
if (shouldNotUpload()) {
return;
}

Expand All @@ -185,6 +182,30 @@ def fileNameArchSuffix(architecture) {
return (architecture == '64') ? 'x64' : architecture
}

def shouldNotUpload() {
if (isRelease) {
return false
}

if (isPullRequest()) {
//Only upload files if not in a PR (i.e., CHANGE_ID not empty)
echo "[DO NO UPLOAD] In PR " + (env.CHANGE_ID?.trim())
return true
}

if (isNotDevBranch()) {
echo "[DO NO UPLOAD] In branch " + (env.BRANCH_NAME?.trim())
return true
}

// Do upload
return false
}

def isNotDevBranch() {
return env.BRANCH_NAME != "dev"
}

def isPullRequest() {
return env.CHANGE_ID != null
}
Expand Down
17 changes: 0 additions & 17 deletions PharoLauncherCmdLine-description.md

This file was deleted.

Loading