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

10: Update git-skara update to show changes #658

wants to merge 1 commit into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -24,6 +24,7 @@

import org.openjdk.skara.args.Main;
import org.openjdk.skara.vcs.Repository;
import org.openjdk.skara.vcs.openjdk.CommitMessageParsers;
import org.openjdk.skara.version.Version;

@@ -134,15 +135,20 @@ private static void update(String[] args) throws IOException, InterruptedExcepti

var head = repo.get().head();
System.out.print("Checking for updates ...");
System.out.println("Checking for updates ...");
for (var s : repo.get().submodules()) {
var newHead = repo.get().head();

if (!head.equals(newHead)) {
System.out.println("updates downloaded");
System.out.println("Found the following updates:");
var commits = repo.get().commitMetadata(head, newHead);
for (var commit : commits) {
var message = CommitMessageParsers.v1.parse(commit);
System.out.println("- " + message.title());
System.out.println("Rebuilding ...");
var cmd = new ArrayList<String>();
if (System.getProperty("").toLowerCase().startsWith("win")) {
@@ -161,7 +167,7 @@ private static void update(String[] args) throws IOException, InterruptedExcepti
} else {
System.out.println("no updates found");
System.out.println("No updates found");