Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master-ame
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
#	launch/src/main/java/meteordevelopment/meteorclient/Main.java
#	src/main/java/meteordevelopment/meteorclient/MeteorClient.java
#	src/main/java/meteordevelopment/meteorclient/addons/AddonManager.java
#	src/main/java/meteordevelopment/meteorclient/mixin/CommandSuggestorMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/InGameHudMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/MinecraftClientMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/NamespaceResourceManagerMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/ReloadableResourceManagerImplMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/SplashTextResourceSupplierMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixin/TitleScreenMixin.java
#	src/main/java/meteordevelopment/meteorclient/mixininterface/ILivingEntityRenderer.java
#	src/main/java/meteordevelopment/meteorclient/systems/commands/Command.java
#	src/main/java/meteordevelopment/meteorclient/systems/config/Config.java
#	src/main/java/meteordevelopment/meteorclient/systems/hud/HUD.java
#	src/main/java/meteordevelopment/meteorclient/systems/hud/HudRenderer.java
#	src/main/java/meteordevelopment/meteorclient/systems/hud/elements/PlayerModelHud.java
#	src/main/java/meteordevelopment/meteorclient/systems/hud/modules/CombatHud.java
#	src/main/java/meteordevelopment/meteorclient/systems/hud/modules/InventoryViewerHud.java
#	src/main/java/meteordevelopment/meteorclient/systems/hud/modules/WatermarkHud.java
#	src/main/java/meteordevelopment/meteorclient/systems/modules/misc/DiscordPresence.java
#	src/main/java/meteordevelopment/meteorclient/utils/misc/MeteorStarscript.java
#	src/main/java/meteordevelopment/meteorclient/utils/network/Capes.java
#	src/main/java/meteordevelopment/meteorclient/utils/network/OnlinePlayers.java
#	src/main/java/meteordevelopment/meteorclient/utils/player/PathFinder.java
#	src/main/resources/meteor-client.accesswidener
#	src/main/resources/meteor-client.mixins.json
  • Loading branch information
JFronny committed Jul 24, 2022
2 parents 35fac9e + bace38b commit 2230f1d
Show file tree
Hide file tree
Showing 872 changed files with 8,531 additions and 5,710 deletions.
5 changes: 5 additions & 0 deletions .github/devbuilds/get_number.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const axios = require("axios").default;

axios.get("https://meteorclient.com/api/stats").then(res => {
console.log("::set-output name=number::" + (parseInt(res.data.devBuild) + 1));
});
69 changes: 69 additions & 0 deletions .github/devbuilds/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
const axios = require("axios").default;
const FormData = require("form-data");
const fs = require("fs");

const branch = process.argv[2];
const compareUrl = process.argv[3];
const success = process.argv[4] === "true";

function send(version, number) {
axios.get(compareUrl).then(res => {
let description = "";

description += "**Branch:** " + branch;
description += "\n**Status:** " + (success ? "success" : "failure");

let changes = "\n\n**Changes:**";
let hasChanges = false;
for (let i in res.data.commits) {
let commit = res.data.commits[i];

changes += "\n- [`" + commit.sha.substring(0, 7) + "`](https://github.com/MeteorDevelopment/meteor-client/commit/" + commit.sha + ") *" + commit.commit.message + "*";
hasChanges = true;
}
if (hasChanges) description += changes;

if (success) {
description += "\n\n**Download:** [meteor-client-" + version + "-" + number + "](https://meteorclient.com/download?devBuild=" + number + ")";
}

const webhook = {
username: "Dev Builds",
avatar_url: "https://meteorclient.com/icon.png",
embeds: [
{
title: "meteor client v" + version + " build #" + number,
description: description,
url: "https://meteorclient.com",
color: success ? 2672680 : 13117480
}
]
};

axios.post(process.env.DISCORD_WEBHOOK, webhook);
});
}

if (success) {
let jar = "";
fs.readdirSync("../../build/libs").forEach(file => {
if (!file.endsWith("-all.jar") && !file.endsWith("-sources.jar")) jar = "../../build/libs/" + file;
});

let form = new FormData();
form.append("file", fs.createReadStream(jar));

axios.post("https://meteorclient.com/api/uploadDevBuild", form, {
headers: {
...form.getHeaders(),
"Authorization": process.env.SERVER_TOKEN
}
}).then(res => {
send(res.data.version, res.data.number)
});
}
else {
axios.get("https://meteorclient.com/api/stats").then(res => {
send(res.data.dev_build_version, parseInt(res.data.devBuild) + 1)
});
}
158 changes: 158 additions & 0 deletions .github/devbuilds/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .github/devbuilds/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "devbuilds",
"version": "1.0.0",
"description": "",
"main": "index.js",
"author": "MineGame159",
"license": "MIT",
"scripts": {
"get_number": "node get_number.js",
"start": "node index.js"
},
"dependencies": {
"axios": "^0.27.2",
"form-data": "^4.0.0"
}
}
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Set up Node JS
uses: actions/setup-node@v3
with:
node-version: latest

- name: Get current dev build number
id: dev-build
run: |
cd .github/devbuilds
npm install
npm run get_number
- name: Build
run: ./gradlew build -Pcommit=${{ github.sha }} -Pdevbuild=${{ steps.dev-build.outputs.number }}

- name: Webhook Failure
if: ${{ failure() }}
run: |
cd .github/devbuilds
npm start ${{ github.ref_name }} https://api.github.com/repos/MeteorDevelopment/meteor-client/compare/${{ github.event.before }}...${{ github.event.after }} false
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}


- name: Publish
run: ./gradlew publish -Pcommit=${{ github.sha }} -Pdevbuild=${{ steps.dev-build.outputs.number }}
env:
MAVEN_METEOR_ALIAS: ${{ secrets.MAVEN_METEOR_ALIAS }}
MAVEN_METEOR_TOKEN: ${{ secrets.MAVEN_METEOR_TOKEN }}

- name: Upload file & Discord webhook
run: |
cd .github/devbuilds
npm start ${{ github.ref_name }} https://api.github.com/repos/MeteorDevelopment/meteor-client/compare/${{ github.event.before }}...${{ github.event.after }} true
env:
SERVER_TOKEN: ${{ secrets.SERVER_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ out
run
bin
logs
.circleci/discordwebhook/node_modules
.github/devbuilds/node_modules
*.iws
*.ipr
*.iml
.idea/*
!.idea/copyright/*
!.idea/scopes/*
8 changes: 4 additions & 4 deletions .idea/copyright/Meteor.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/Meteor_Copyright_Notice.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ group = project.maven_group
repositories {
maven {
name = "meteor-maven"
url = "https://maven.meteordev.org"
url = "https://maven.meteordev.org/releases"
}
maven {
name = "meteor-maven-snapshots"
Expand Down Expand Up @@ -58,8 +58,12 @@ dependencies {
library "meteordevelopment:starscript:${project.starscript_version}"
library "org.reflections:reflections:${project.reflections_version}"

implementation("io.netty:netty-handler-proxy:4.1.77.Final") { transitive = false }
shadow("io.netty:netty-handler-proxy:4.1.77.Final") { transitive = false }
// Proxies
implementation("io.netty:netty-handler-proxy:${project.netty_version}") { transitive = false }
shadow("io.netty:netty-handler-proxy:${project.netty_version}") { transitive = false }

implementation("io.netty:netty-codec-socks:${project.netty_version}") { transitive = false }
shadow("io.netty:netty-codec-socks:${project.netty_version}") { transitive = false }

library "io.gitlab.jfronny.libjf:libjf-unsafe-v0:${project.jfapi_version}"
include "io.gitlab.jfronny.libjf:libjf-base:${project.jfapi_version}"
Expand Down Expand Up @@ -128,5 +132,3 @@ publishing {
}
}
}

apply from: "scripts/packetutils.gradle"
Loading

0 comments on commit 2230f1d

Please sign in to comment.