forked from MeteorDevelopment/meteor-client
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into master-ame
# 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
Showing
872 changed files
with
8,531 additions
and
5,710 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.