Skip to content

Commit

Permalink
Merge branch 'feature/classic-tbc-retail-compat' into release/9.1.000
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWanderer-GH committed May 29, 2021
2 parents cd6abd5 + 81fd250 commit 6a129fa
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 25 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/feature-branch-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packager"]
path = packager
url = https://github.com/BigWigsMods/packager
40 changes: 18 additions & 22 deletions core.lua
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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@
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions packager
Submodule packager added at ff497d
11 changes: 8 additions & 3 deletions test_build_all.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6a129fa

Please sign in to comment.