From 3a8f4104f5886ba662279636ff6340237d03c58e Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Thu, 1 Dec 2022 23:15:12 +0000 Subject: [PATCH] chore: prep for main branch --- .github/workflows/nightly.yml | 13 +++++++------ src/asarUpdate.js | 2 +- src/bootstrap.js | 2 +- src/index.js | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index db657d6..bfd3e1e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2,6 +2,7 @@ name: Nightly on: push: + branches: [ main ] paths: - 'src/**' - 'scripts/**' @@ -145,12 +146,12 @@ jobs: - name: GitHub Release run: | echo ${{ env.VERSION }} - git tag -d ${{ env.VERSION }}-cirelease || true - git push origin --delete ${{ env.VERSION }}-cirelease || true - git tag ${{ env.VERSION }}-cirelease - git push origin ${{ env.VERSION }}-cirelease - gh release delete ${{ env.VERSION }}-cirelease -y || true - gh release create ${{ env.VERSION }}-cirelease -t "$(echo "${{ env.VERSION }}" | sed 's/.*/\u&/' | sed "s/nt/n't/")" -n "$(git rev-parse HEAD | cut -c 1-7) | $(git log -1 --pretty=%B)" "$([ "${{ env.VERSION }}" != "nightly" ] && echo "-p")" ${{ env.FILES }} + git tag -d ${{ env.VERSION }} || true + git push origin --delete ${{ env.VERSION }} || true + git tag ${{ env.VERSION }} + git push origin ${{ env.VERSION }} + gh release delete ${{ env.VERSION }} -y || true + gh release create ${{ env.VERSION }} -t "$(echo "${{ env.VERSION }}" | sed 's/.*/\u&/' | sed "s/nt/n't/")" -n "$(git rev-parse HEAD | cut -c 1-7) | $(git log -1 --pretty=%B)" "$([ "${{ env.VERSION }}" != "nightly" ] && echo "-p")" ${{ env.FILES }} env: GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' VERSION: $(strings app.asar | grep -oP "oaVersion='.*?-" | grep -oP "(?<=').*?(?=-)") diff --git a/src/asarUpdate.js b/src/asarUpdate.js index f26830a..382d82a 100644 --- a/src/asarUpdate.js +++ b/src/asarUpdate.js @@ -5,7 +5,7 @@ const { join } = require('path'); const asarPath = join(require.main.filename, '..'); const downloadPath = join(asarPath, '..', 'app.asar.download'); -const asarUrl = `https://github.com/GooseMod/OpenAsar/releases/download/${oaVersion.split('-')[0]}-cirelease/app.asar`; +const asarUrl = `https://github.com/GooseMod/OpenAsar/releases/download/${oaVersion.split('-')[0]}/app.asar`; // todo: have these https utils centralised? const redirs = url => new Promise(res => get(url, r => { // Minimal wrapper around https.get to follow redirects diff --git a/src/bootstrap.js b/src/bootstrap.js index 0999928..259eaac 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -40,7 +40,7 @@ const startCore = () => { const [ channel, hash ] = oaVersion.split('-'); // Split via - bw.webContents.executeJavaScript(readFileSync(join(__dirname, 'mainWindow.js'), 'utf8') - .replaceAll('', channel === 'nightly' ? hash : (channel + ' ' + hash)) + .replaceAll('', hash) .replaceAll('', oaConfig.noTrack) .replace('', (oaConfig.css ?? '').replaceAll('\\', '\\\\').replaceAll('`', '\\`'))); diff --git a/src/index.js b/src/index.js index 0d03202..70328df 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ const { join } = require('path'); global.log = (area, ...args) => console.log(`[\x1b[38;2;88;101;242mOpenAsar\x1b[0m > ${area}]`, ...args); // Make log global for easy usage everywhere -global.oaVersion = 'polynt'; +global.oaVersion = 'nightly'; log('Init', 'OpenAsar', oaVersion);