diff --git a/.github/workflows/feature-branch-build.yaml b/.github/workflows/feature-branch-build.yaml index a3d229e..f71a996 100644 --- a/.github/workflows/feature-branch-build.yaml +++ b/.github/workflows/feature-branch-build.yaml @@ -47,6 +47,47 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Get artifact + uses: actions/download-artifact@v2 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ./zip/ + build-bc: + + runs-on: ubuntu-latest + + steps: + #- name: Dump GitHub context + # env: + # GITHUB_CONTEXT: ${{ toJSON(github) }} + # run: echo "$GITHUB_CONTEXT" + + - uses: actions/checkout@v1 + + - uses: BigWigsMods/packager@master + name: Build Classic + with: + args: -r ./zip -z -d -g classic + + - name: Name artifact with git hash + run: echo 'ARTIFACT_NAME=BC-${{ github.event.repository.name }}-'$(git -C ./zip show --no-patch --format="%H") >> $GITHUB_ENV + + - name: Store built zip + uses: actions/upload-artifact@v2 + with: + name : ${{ env.ARTIFACT_NAME }} + path: ./zip/ + + + env: + CF_API_KEY: ${{ secrets.CF_API_KEY }} + + deploy-bc: + needs: build-bc + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Get artifact uses: actions/download-artifact@v2 with: diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c7052ec --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "packager"] + path = packager + url = https://github.com/BigWigsMods/packager diff --git a/core.lua b/core.lua index 3e2068e..9e9fd82 100644 --- a/core.lua +++ b/core.lua @@ -1,6 +1,6 @@ local ORANGEY, LIGHTRED = '|cffFF4500', '|cffff6060' local version, build, date, build_toc_version = GetBuildInfo() -local major_version = floor(version / 10000) +local major_version = floor(build_toc_version / 10000) -- version numbering is X.XX.XX shorten in param 4 as XXXXX --local SUPPORTED_RETAIL_VERSION = 90000 --local MAX_SUPPORTED_RETAIL_VERSION = 90099 @@ -11,15 +11,15 @@ local major_version = floor(version / 10000) --local IS_TBC = (build_toc_version > MAX_SUPPORTED_CLASSIC_VERSION and build_toc_version <= MAX_SUPPORTED_TBC_VERSION) --@version-retail@ -local MAX_SUPPORTED_VERSION = 90099 +local MAX_SUPPORTED_VERSION = 90099 --@end-version-retail@ --@version-classic@ -local MAX_SUPPORTED_VERSION = 19999 +local MAX_SUPPORTED_VERSION = 19999 --@end-version-classic@ --@version-bcc@ -local MAX_SUPPORTED_VERSION = 20501 +local MAX_SUPPORTED_VERSION = 20501 --@end-version-bcc@ --[===[@non-version-classic@ @@ -29,8 +29,7 @@ local AddonBackdropTemplate = "BackdropTemplate" local AddonBackdropTemplate = nil --@end-version-classic@ -local MAX_MAJOR_VERSION = floor(MAX_SUPPORTED_VERSION / 10000) - +local MAX_MAJOR_VERSION = floor(MAX_SUPPORTED_VERSION / 10000) local CoolLine = CreateFrame("Frame", "CoolLine", UIParent) CoolLine.MainFrame = CoolLine @@ -52,7 +51,6 @@ if build_toc_version > MAX_SUPPORTED_VERSION or (major_version < MAX_MAJOR_VERSI print(format("%sMax supported version is |r%s", ORANGEY, MAX_SUPPORTED_VERSION)) end - local smed = LibStub("LibSharedMedia-3.0") local _G, pairs, strmatch, tinsert, tremove, random = _G, pairs, string.match, table.insert, table.remove, math.random @@ -357,23 +355,21 @@ function CoolLine:PLAYER_LOGIN() self.SPELL_UPDATE_CHARGES = self.SPELL_UPDATE_COOLDOWN self:SPELL_UPDATE_COOLDOWN() - -- IF WOW RETAIL THEN - if not IS_CLASSIC then - self:RegisterEvent("PET_BATTLE_OPENING_START") - self:RegisterEvent("PET_BATTLE_CLOSE") - self.PET_BATTLE_OPENING_START = self.Hide - self.PET_BATTLE_CLOSE = self.Show - if C_PetBattles.IsInBattle() then - self:Hide() - end + --@version-retail@ + self:RegisterEvent("PET_BATTLE_OPENING_START") + self:RegisterEvent("PET_BATTLE_CLOSE") + self.PET_BATTLE_OPENING_START = self.Hide + self.PET_BATTLE_CLOSE = self.Show + if C_PetBattles.IsInBattle() then + self:Hide() + end - self:RegisterUnitEvent("UNIT_ENTERED_VEHICLE", "player") - if UnitHasVehicleUI("player") then - self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN") - self:RegisterUnitEvent("UNIT_EXITED_VEHICLE", "player") - end + self:RegisterUnitEvent("UNIT_ENTERED_VEHICLE", "player") + if UnitHasVehicleUI("player") then + self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN") + self:RegisterUnitEvent("UNIT_EXITED_VEHICLE", "player") end - -- END WOW RETAIL + --@end-version-retail@ updatelook() self:SetAlpha((#cooldowns == 0 and db.inactivealpha) or db.activealpha) diff --git a/packager b/packager new file mode 160000 index 0000000..ff497dd --- /dev/null +++ b/packager @@ -0,0 +1 @@ +Subproject commit ff497ddc591e87719d9da67f6dc106a4aa6a873d diff --git a/test_build_all.sh b/test_build_all.sh index 8dc0e87..744ef20 100644 --- a/test_build_all.sh +++ b/test_build_all.sh @@ -1,4 +1,9 @@ #!/usr/bin/env bash -./release.sh -r ./test_build_classic -e -g classic -d -l -z -./release.sh -r ./test_build_bc -e -g bcc -d -l -z -./release.sh -r ./test_build_retail -e -g retail -d -l -z +addon_dir_path="Interface/AddOns/" +# ./packager/release.sh -r ${WOW_ROOT}/__classic_era__/Interface\AddOns/CoolLine -e -g classic -d -l -z +# ./packager/release.sh -r ${WOW_ROOT}/__classic__/Interface/AddOns/CoolLine -e -g bcc -d -l -z +# ./packager/release.sh -r ${WOW_ROOT}/__retail__/Interface/AddOns/CoolLine -e -g retail -d -l -z + +./packager/release.sh -r "${WOW_ROOT_LINUX}/_classic_era_/${addon_dir_path}" -g classic -d -l -z +./packager/release.sh -r "${WOW_ROOT_LINUX}/_classic_/${addon_dir_path}" -g bcc -d -l -z +./packager/release.sh -r "${WOW_ROOT_LINUX}/_retail_/${addon_dir_path}" -g retail -d -l -z