Skip to content

Commit

Permalink
Improve Release Flows
Browse files Browse the repository at this point in the history
* compute versions to update
* update publishing documentation

Contributed on behalf of STMicroelectronics
  • Loading branch information
jfaltermeier committed Oct 28, 2024
1 parent 1fc2fc2 commit 74c4d23
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
31 changes: 30 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,11 @@ spec:
}
container('jnlp') {
script {
echo 'Computing updatable versions before uploading new installer'
def updatableVersions = getUpdatableVersions()
echo 'updatableVersions: ' + updatableVersions
uploadInstaller('windows')
copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.46.0,1.46.100,1.47.0,1.47.100,1.48.0,1.48.300,1.49.100,1.49.101,1.50.0,1.50.100,1.51.0,1.52.0,1.53.100,1.53.200')
copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', updatableVersions)
}
}
}
Expand Down Expand Up @@ -413,6 +416,32 @@ def uploadInstaller(String platform) {
}
}

/**
* List all directories in the ide-preview directory.
* Only takes the ones with a version identifier name.
* Only take version numbers lower than the current version.
*/
def getUpdatableVersions() {
def packageJSON = readJSON file: "package.json"
String currentVersion = "${packageJSON.version}"

def versions = ''

sshagent(['projects-storage.eclipse.org-bot-ssh']) {
versions = sh(
script: """
ssh genie.theia@projects-storage.eclipse.org "cd /home/data/httpd/download.eclipse.org/theia/ide-preview/ && \
find . -maxdepth 1 -type d -regex '.*/[0-9]+\\.[0-9]+\\.[0-9]+' -exec basename {} \\; | sort -V | awk -v curVer='${currentVersion}' '{
if (\\\$1 != curVer && \\\$1 < curVer) print \\\$1
}' | paste -sd ','"
""",
returnStdout: true
).trim()
}

return versions
}

/**
* Currently we have the windows updater available twice with different names.
* We want to have a name without the versions for providing a stable download link.
Expand Down
9 changes: 0 additions & 9 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ If there was a Theia Release

and adapt the code/built-ins accordingly.

Next, update the `Jenkinsfile`'s `copyInstallerAndUpdateLatestYml` invocation for windows. Here we have to specficy for which olders versions we want to enable direct (incremental) updates to this version on Windows.\
See <https://download.eclipse.org/theia/ide-preview/> for the available old versions.\
*We plan to automate this, but at the moment it's a manual step.*

E.g.:\
`copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.46.0,1.46.100,1.47.0')`\
->\
`copyInstallerAndUpdateLatestYml('windows', 'TheiaIDESetup', 'exe', 'latest.yml', '1.46.0,1.46.100,1.47.0,1.47.100')`

Finally, open a PR with your changes.

## Upgrade Dependencies
Expand Down

0 comments on commit 74c4d23

Please sign in to comment.