Skip to content

Commit

Permalink
Whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
MineGame159 committed Jan 8, 2025
1 parent b279889 commit 85ceea8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/builds/get_number.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) Meteor Development.
*/

const { getMcVersion } = require("./mc_version")
import { getMcVersion } from "./mc_version.js"

const mcVersion = await getMcVersion();

Expand Down
2 changes: 1 addition & 1 deletion .github/builds/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) Meteor Development.
*/

const { getMcVersion } = require("./mc_version")
import { getMcVersion } from "./mc_version.js"

const buildNumber = process.argv[2];
const branch = process.argv[3];
Expand Down
4 changes: 2 additions & 2 deletions .github/builds/mc_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Copyright (c) Meteor Development.
*/

const fs = require("fs")
const readline = require("readline")
import * as fs from "fs"
import * as readline from "readline"

export async function getMcVersion() {
let lines = readline.createInterface({
Expand Down
3 changes: 2 additions & 1 deletion .github/builds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"main": "index.js",
"author": "MineGame159",
"license": "MIT",
"type": "module",
"scripts": {
"get_number": "node get_number.js",
"start": "node index.js"
"webhook": "node index.js"
}
}
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dev Build
name: Build

concurrency:
group: "build"
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
cd .github/builds
npm install
node get_number.js >> $GITHUB_OUTPUT
npm run get_number >> $GITHUB_OUTPUT
- name: Build
run: ./gradlew build -Pcommit=${{ github.sha }} -Pbuild_number=${{ steps.build-number.outputs.number }}
Expand All @@ -47,7 +47,7 @@ jobs:
if: ${{ failure() }}
run: |
cd .github/builds
npm start ${{ steps.build-number.outputs.number }} ${{ github.ref_name }} https://api.github.com/repos/MeteorDevelopment/meteor-client/compare/${{ github.event.before }}...${{ github.event.after }} false
npm run webhook ${{ steps.build-number.outputs.number }} ${{ 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 }}

Expand All @@ -60,7 +60,7 @@ jobs:
- name: Discord webhook
run: |
cd .github/builds
npm start ${{ steps.build-number.outputs.number }} ${{ github.ref_name }} https://api.github.com/repos/MeteorDevelopment/meteor-client/compare/${{ github.event.before }}...${{ github.event.after }} true
npm run webhook ${{ steps.build-number.outputs.number }} ${{ 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 }}

0 comments on commit 85ceea8

Please sign in to comment.