From d3c8594297794cc7b89f46bda500ebbac39ea0e9 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Thu, 14 Sep 2023 20:00:07 -0400 Subject: [PATCH 1/2] Regenerate changelog.yml after deploying Webpanel is displaying incorrect information because the changelog is only really built before the milestones are updated. --- .github/workflows/ci-pipeline.yml | 50 +++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index e28fb8111a..fd65c0dc03 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -184,15 +184,15 @@ jobs: with: ref: "refs/pull/${{ github.event.number }}/merge" - - name: gh-pages Clone - run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox - - name: Restore run: dotnet restore - name: Build ReleaseNotes run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + - name: gh-pages Clone + run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox + - name: Build Changelog (Incremental) run: | mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null @@ -1646,6 +1646,50 @@ jobs: asset_name: tgstation-server-installer.exe asset_content_type: application/octet-stream + changelog-regen: + name: Regenerate Changelog + runs-on: ubuntu-latest + needs: deploy-tgs + if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success') + steps: + - name: Setup dotnet + uses: actions/setup-dotnet@v2 + with: + dotnet-version: ${{ env.TGS_DOTNET_VERSION }} + + - name: Checkout + uses: actions/checkout@v3 + + - name: Restore + run: dotnet restore + + - name: Build ReleaseNotes + run: dotnet build -c Release -p:TGS_HOST_NO_WEBPANEL=true tools/Tgstation.Server.ReleaseNotes/Tgstation.Server.ReleaseNotes.csproj + + - name: gh-pages Clone + run: git clone -b gh-pages --single-branch "https://git@github.com/tgstation/tgstation-server" $HOME/tgsdox + + - name: Build Changelog (Incremental) + run: | + mv $HOME/tgsdox/changelog.yml ./ 2>/dev/null + dotnet run -c Release --no-build --project tools/Tgstation.Server.ReleaseNotes --generate-full-notes + + - name: gh-pages Push + run: | + pushd $HOME/tgsdox + rm -f changelog.yml + popd + sudo mv changelog.yml $HOME/tgsdox/ + cd $HOME/tgsdox + git config --global push.default simple + git config user.name "tgstation-server" + git config user.email "tgstation-server@tgstation13.org" + git add changelog.yml + echo "Committing..." + git diff-index --quiet HEAD || git commit -m "Regenerate changelog post deploy for workflow run ${{ github.run_number }}" -m "Commit: ${{ github.event.head_commit.id }}" + echo "Pushing..." + git push -f "https://${{ secrets.DEV_PUSH_TOKEN }}@github.com/tgstation/tgstation-server" 2>&1 + deploy-docker: name: Deploy TGS (Docker) needs: deploy-tgs From e8d83c6e9b2ca2b1fb178d4e2898a1eb78c2240f Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Thu, 14 Sep 2023 20:42:00 -0400 Subject: [PATCH 2/2] Background fill the .ico - Add additional ignores/msbuild deletes to icon gen script --- .gitignore | 2 ++ build/logo.svg | 6 +++++- .../Tgstation.Server.Common.csproj | 4 ++-- src/Tgstation.Server.Common/build_logo.js | 18 +++++++++++++----- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 770d2a28d4..32a0e7ad23 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ packaging/ /src/Tgstation.Server.Common/node_modules /src/Tgstation.Server.Common/package.json /src/Tgstation.Server.Common/yarn.lock +/src/Tgstation.Server.Common/logo_bg_white.svg +yarn-error.log* diff --git a/build/logo.svg b/build/logo.svg index 58b432ac35..a3b75b7af6 100644 --- a/build/logo.svg +++ b/build/logo.svg @@ -118,4 +118,8 @@ style="stroke:#ffffff;stroke-width:1;stroke-dasharray:none;stroke-opacity:1" /> + id="path10" /> diff --git a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj index 972ee6b33c..9ff1909f7f 100644 --- a/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj +++ b/src/Tgstation.Server.Common/Tgstation.Server.Common.csproj @@ -10,7 +10,7 @@ - + @@ -24,6 +24,6 @@ - + diff --git a/src/Tgstation.Server.Common/build_logo.js b/src/Tgstation.Server.Common/build_logo.js index caf3f2eb7b..c79a46903c 100644 --- a/src/Tgstation.Server.Common/build_logo.js +++ b/src/Tgstation.Server.Common/build_logo.js @@ -1,6 +1,6 @@ // Prereq packages: svg-to-ico@1.0.14 svg2img@1.0.0-beta.2 // Usage: node ./build_logo.js -// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico +// Generates ../../artifacts/tgs.ico and ../../artifacts/tgs.ico const svg_to_img = require("svg-to-ico"); const svg2img = require('svg2img'); @@ -10,12 +10,19 @@ if (!fs.existsSync("../../artifacts")) { fs.mkdirSync("../../artifacts",'0777', true); } +const svg_bytes = fs.readFileSync("../../build/logo.svg"); +const svg = svg_bytes.toString(); +const white_bg_svg = svg + .replace("