Skip to content

Commit

Permalink
Merge pull request #6 from eMoflon/hotfix/p2-package-error-exit-1
Browse files Browse the repository at this point in the history
P2 package error exit 1 if pipeline fails + fixes installation with new Xtext version
  • Loading branch information
maxkratz authored Nov 23, 2022
2 parents 0e50383 + d94c005 commit 25cbe94
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
24 changes: 24 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,28 @@ install_packages () {
chmod +x $ECLIPSE_BIN_PATH
fi

set -o pipefail
$ECLIPSE_BIN_PATH -nosplash \
-application org.eclipse.equinox.p2.director \
-repository "$1" \
-installIU "$(parse_package_list $2)" \
| grep -v 'DEBUG'
set +o pipefail
}

# Uninstalls a given list of packages.
uninstall_packages () {
if [[ "$OS" = "macos" ]]; then
chmod +x $ECLIPSE_BIN_PATH
fi

set -o pipefail
$ECLIPSE_BIN_PATH -nosplash \
-application org.eclipse.equinox.p2.director \
-repository "$1" \
-uninstallIU "$(parse_package_list $2)" \
| grep -v 'DEBUG'
set +o pipefail
}

# Displays the given input including "=> " on the console.
Expand Down Expand Up @@ -260,6 +277,13 @@ for p in ${ORDER[@]}; do
log "Skipping plug-in: $p."
continue
fi

# Check if Xtext (old version) must be uninstalled first.
if [[ "$p" = "xtext" ]]; then
log "Uninstalling plug-in: $p."
uninstall_packages "$UPDATESITES" "./packages/$p-uninstall-packages.list"
fi

log "Installing plug-in: $p."
install_packages "$UPDATESITES" "./packages/$p-packages.list"
done
Expand Down
21 changes: 21 additions & 0 deletions packages/xtext-uninstall-packages.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
org.eclipse.xtend.sdk.feature.group
org.eclipse.xtext.docs.feature.group
org.eclipse.xtext.examples.feature.group
org.eclipse.xtext.redist.feature.group
org.eclipse.xtext.runtime.feature.group
org.eclipse.xtext.sdk.feature.group
org.eclipse.xtext.ui.feature.group
org.eclipse.xtext.xbase.feature.group
org.eclipse.xtext.xtext.ui.feature.group
org.eclipse.xtext.xtext.ui.graph.feature.group
org.eclipse.xtext.docs.feature.group
org.eclipse.xtext.examples.feature.group
org.eclipse.xtext.redist.feature.group
org.eclipse.xtext.runtime.feature.group
org.eclipse.xtext.sdk.feature.group
org.eclipse.xtext.ui.feature.group
org.eclipse.xtext.xbase.feature.group
org.eclipse.xtext.xbase.lib.feature.group
org.eclipse.xtext.xtext.ui.feature.group
org.eclipse.emf.mwe2.language.ui
org.eclipse.emf.mwe2.language.sdk.feature.group

0 comments on commit 25cbe94

Please sign in to comment.