Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
44 changes: 40 additions & 4 deletions JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ pipeline {
replaceInFile('production/testScripts/configuration/streamSpecific.properties', [
"for ${PREVIOUS_RELEASE_VERSION}.0 builds" : "for ${NEXT_RELEASE_VERSION}.0 builds",
])
replaceAllInFile('scripts/updateProductVersion.sh', [
's/\\d+.\\d+.0/\\d+.\\d+.0/g' : "g|s/${PREVIOUS_RELEASE_VERSION}.0/${NEXT_RELEASE_VERSION}.0/g",
])

commitAllChangesExcludingSubmodules("Update versions to ${NEXT_RELEASE_VERSION} in build scripts")
}
Expand Down Expand Up @@ -145,6 +142,41 @@ pipeline {
commitAllChangesExcludingSubmodules("Move previous version to ${PREVIOUS_RELEASE_CANDIDATE_TAG} in build scripts")
}
}
stage('Validate and list changes') {
steps {
sh '''
function printLatestGitHistory() {
git log origin/master..HEAD --patch-with-stat --summary
}
printLatestGitHistory
export -f printLatestGitHistory
git submodule foreach 'printLatestGitHistory'
'''
// Run simple clean build to verify that at least all parent versions are updated correctly
sh 'mvn clean'
// search for leftover occurrences of the previous release version
sh '''#!/bin/bash -e
matchingFiles=$(grep --recursive --files-with-matches \
--include pom.xml \
--include MANIFEST.MF \
--include feature.xml \
--include \\*.product \
--fixed-strings "${PREVIOUS_RELEASE_VERSION}")
# The eclipse-platform-parent/pom.xml contains the previous version in the baseline repository variable
if [[ -z "${matchingFiles}" ]] || [[ "${matchingFiles}" == 'eclipse-platform-parent/pom.xml' ]]; then
echo "No unexpected references to previous version ${PREVIOUS_RELEASE_VERSION} found:"
exit 0
else
echo "References to previous version ${PREVIOUS_RELEASE_VERSION} found:"
for f in ${matchingFiles}; do
echo "In file ${f}"
grep "${PREVIOUS_RELEASE_VERSION}" "${f}"
done
exit 1
fi
'''
}
}
stage ('Create and update Stream Repos') {
when {
not { expression { params.DRY_RUN } }
Expand Down Expand Up @@ -318,7 +350,11 @@ def replaceInFile(String filePath, Map<String,String> replacements) {
def replaceAllInFile(String filePath, Map<String,String> replacements) {
def content = readFile(filePath)
for (entry in replacements) {
content = content.replaceAll(entry.key, entry.value)
def newContent = content.replaceAll(entry.key, entry.value)
if (newContent == content && !(content =~ entry.key)) { // pattern matches, but the replacement is equal to the current content
error("Pattern not found in file '${filePath}': ${entry.key}")
}
content = newContent
}
writeFile(file:filePath, text: content)
}
Expand Down
1 change: 0 additions & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ Previously they were created in ther own job:
#### **Version Updates:**
- Running the [`Prepare Next Development Cycle`](https://ci.eclipse.org/releng/job/Releng/job/prepareNextDevCycle/) job will update pom and product versions for the Eclipse repositories and submit pull requests for the changes.
This is still a work in progress so if there are any issues or a repo gets missed you can fall back to the old process below:
If you cloned eclipse.platform.releng.aggregator's submodules you can fix the set version and run [updateProductVersion.sh](scripts/updateProductVersion.sh) to update most of the versions.
Once that's done it's easiest to just grep for the previous release version or stream number to find the remaining instances that need to be updated, then commit the changes in a new branch for each repo.
- **Update version number in mac's Eclipse.app**
- In [eclipse-equinox/equinox](https://github.com/eclipse-equinox/equinox) update the versions in the Info.plist for both architectures under `eclipse-equinox/equinox/features/org.eclipse.equinox.executable.feature/bin/cocoa/macosx`
Expand Down
21 changes: 0 additions & 21 deletions scripts/updateProductVersion.sh

This file was deleted.

Loading