Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

133 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOC Interface Updater

This script will parse World of Warcraft AddOn metadata files (TOC) and update the Interface version(s) to the most recent version(s) of the game.

Multiple client flavors

This script supports updating the multiple TOC files the game officially supports, such as:

  • MyAddon.toc (default)
  • MyAddon_Mainline.toc (Retail)
  • MyAddon_Vanilla.toc (Classic Era)
  • MyAddon_Mists.toc (Mists of Pandaria Classic)

Flavor

Which game "flavor" the script should update for in the unsuffixed TOC file is defined by passing an argument to the script, which can be any of the following:

  • retail (aliases: mainline)
  • mists (aliases: classic)
  • wrath (aliases: titan)
  • tbc (aliases: anniversary)
  • vanilla (aliases: classic_era)

The script will default to retail unless specified.
The script supports specifying multiple at once, which will create comma-separated interface versions.

Single-TOC multi-flavor

One of BigWigs' packager features is the ability for it to automatically create TOC files for flavors based on ## Interface suffixes. This script will also check for those.

Beta/PTR

The script can optionally support Beta and PTR versions. If their versions are newer than the current game version they will be appended to the interface version. E.g. If retail is 110002 and there's a PTR for 110005 then the TOC file will be updated to: ## Interface: 110002, 110005.

Usage

You'll need bash >= 4.0, nc, awk, sed, grep, find, getopt and md5sum installed on your system.
Only GNU versions are officially supported, Busybox alternatives (or others) have not been tested.

Then run the script, some examples:

bash update.sh                      # use the default flavor
bash update.sh -f classic           # set Classic as the default Interface version
bash update.sh -f classic -b -p     # set Classic as the default Interface version,
                                    # and add beta and PTR versions
bash update.sh -f retail -f classic # multiple flavors at once

Run the script with --help to see all available options.

GitHub Action

You can use this in a GitHub workflow by referencing p3lim/toc-interface-updater.

Options:

  • flavor - sets the game version for unsuffixed TOC files, see flavor for valid options
    • Multiple flavors can be specified using a multi-line string:
      flavor: |
        retail
        classic
  • beta - set to true if beta versions should be appended
  • ptr - set to true if PTR versions should be appended
  • depth - change the recursion depth when looking for TOC files

Example

This is an example workflow that will do the following:

  • check out the project
  • use this script as an action
  • create a pull request (if there were changes)

This will occur every day at 12:00.

name: Update TOC Interface version(s)

on:
  schedule:
    - cron: 0 12 * * *

permissions: # required by the pull request action
  contents: write
  pull-requests: write

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: Clone project
        uses: actions/checkout@v6

      - name: Update TOC Interface version
        uses: p3lim/toc-interface-updater@v4
        with:
          flavor: retail # this is the default
          beta: true     # this is optional
          ptr: true      # this is optional

      - name: Create pull request
        uses: peter-evans/create-pull-request@v8
        with:
          title: Update Interface version
          commit-message: Update Interface version
          branch: interface-version
          delete-branch: true

Important

The workflow must be allowed to create Pull Requests for this example to work properly (specifically the last step), this is disabled by default.

In your repository settings, under "Actions" → "General", at the bottom make sure "Allow GitHub Actions to create and approve pull requests" is enabled.

About

Update World of Warcraft AddOn TOC Interface version

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages