Commits
md_5 authored 15f42f5d31a
67 67 | import joptsimple.OptionSet; |
68 68 | import joptsimple.OptionSpec; |
69 69 | import joptsimple.util.EnumConverter; |
70 70 | import lombok.RequiredArgsConstructor; |
71 71 | import org.apache.commons.io.FileUtils; |
72 72 | import org.apache.commons.io.output.TeeOutputStream; |
73 73 | import org.eclipse.jgit.api.Git; |
74 74 | import org.eclipse.jgit.api.ResetCommand; |
75 75 | import org.eclipse.jgit.api.errors.GitAPIException; |
76 76 | import org.eclipse.jgit.api.errors.JGitInternalException; |
77 + | import org.eclipse.jgit.lib.GpgConfig; |
77 78 | import org.eclipse.jgit.lib.StoredConfig; |
78 79 | import org.eclipse.jgit.revwalk.RevCommit; |
79 80 | import org.eclipse.jgit.transport.FetchResult; |
80 81 | import org.eclipse.jgit.transport.RefSpec; |
81 82 | import org.spigotmc.mapper.MapUtil; |
82 83 | |
83 84 | public class Builder |
84 85 | { |
85 86 | |
86 87 | public static final String LOG_FILE = "BuildTools.log.txt"; |
667 668 | { |
668 669 | throw new RuntimeException( "Error patching " + relativeName, ex ); |
669 670 | } |
670 671 | } ); |
671 672 | File tmpNms = new File( craftBukkit, "tmp-nms" ); |
672 673 | FileUtils.copyDirectory( nmsDir, tmpNms ); |
673 674 | |
674 675 | craftBukkitGit.branchDelete().setBranchNames( "patched" ).setForce( true ).call(); |
675 676 | craftBukkitGit.checkout().setCreateBranch( true ).setForceRefUpdate( true ).setName( "patched" ).call(); |
676 677 | craftBukkitGit.add().addFilepattern( "src/main/java/net/" ).call(); |
677 - | craftBukkitGit.commit().setSign( false ).setMessage( "CraftBukkit $ " + new Date() ).call(); |
678 + | craftBukkitGit.commit().setGpgConfig( new GpgConfig( null, null, null ) ).setSign( false ).setMessage( "CraftBukkit $ " + new Date() ).call(); |
678 679 | PullRequest craftBukkitPullRequest = getPullRequest( Repository.CRAFTBUKKIT ); |
679 680 | craftBukkitGit.checkout().setName( ( craftBukkitPullRequest == null ) ? buildInfo.getRefs().getCraftBukkit() : "origin/pr/" + craftBukkitPullRequest.getId() ).call(); |
680 681 | |
681 682 | FileUtils.moveDirectory( tmpNms, nmsDir ); |
682 683 | |
683 684 | if ( versionInfo.getToolsVersion() < 93 ) |
684 685 | { |
685 686 | File spigotApi = new File( spigot, "Bukkit" ); |
686 687 | if ( !spigotApi.exists() ) |
687 688 | { |