Append commit hash to version to debug re-releases with the same version number

This commit is contained in:
Send_Nukez 2021-11-05 00:41:59 +01:00
parent 7ef21577f0
commit d91902b301
4 changed files with 14 additions and 4 deletions

View file

@ -22,6 +22,9 @@ jobs:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get commit SHA
run: echo "LATEST_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v2
with:
@ -34,6 +37,7 @@ jobs:
echo "${{ github.event.inputs.version }}" > dist/VERSION
env:
DRIBBBLISH_VERSION: ${{ github.event.inputs.version }}
COMMIT_HASH: ${{ env.LATEST_SHA }}
- name: Zip Release
working-directory: dist

View file

@ -12,6 +12,9 @@ jobs:
with:
ref: ${{ github.head_ref }}
- name: Get commit SHA
run: echo "LATEST_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Setup Node.js
uses: actions/setup-node@v2
with:
@ -22,9 +25,11 @@ jobs:
npm install
npm run build
echo "Dev" > dist/VERSION
env:
COMMIT_HASH: ${{ env.LATEST_SHA }}
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: DribbblishDynamic_vDev
name: DribbblishDynamic_vDev-${{ env.LATEST_SHA }}
path: dist/**

View file

@ -355,7 +355,7 @@ waitForElement(["#main"], () => {
description: `
OS: ${capitalizeFirstLetter(Spicetify.Platform.PlatformData.os_name)} v${Spicetify.Platform.PlatformData.os_version}
Spotify: v${Spicetify.Platform.PlatformData.event_sender_context_information?.client_version_string ?? Spicetify.Platform.PlatformData.client_version_triple}
Dribbblish: v${process.env.DRIBBBLISH_VERSION}
Dribbblish: v${process.env.DRIBBBLISH_VERSION}-${process.env.COMMIT_HASH}
`,
data: "Copy",
onChange: (val) => {

View file

@ -52,7 +52,8 @@ module.exports = {
cleanAfterEveryBuildPatterns: ["*.LICENSE.txt"]
}),
new webpack.DefinePlugin({
"process.env.DRIBBBLISH_VERSION": JSON.stringify(process.env.DRIBBBLISH_VERSION || "Dev")
"process.env.DRIBBBLISH_VERSION": JSON.stringify(process.env.DRIBBBLISH_VERSION || "Dev"),
"process.env.COMMIT_HASH": JSON.stringify(process.env.COMMIT_HASH || "local")
}),
new CopyPlugin({
patterns: [{ from: "src/assets", to: "assets" }]