firebelley / godot-export

Automatically exports your Godot games.
MIT License
461 stars 53 forks source link

fix custom godot build version numbers #65

Closed IsjaslawEisenstadt closed 2 years ago

IsjaslawEisenstadt commented 2 years ago

Fixes #64

As it turns out, custom godot builds add a 9 digit long hash to the end of the string returned by --version:

static String get_full_version_string() {
    String hash = String(VERSION_HASH);
    if (hash.length() != 0)
        hash = "." + hash.left(9);
    return String(VERSION_FULL_BUILD) + hash;
}

I've added a regex to the getGodotVersion function to remove every occurence of a .official and/or any leading 9 digit hash starting with a dot.

firebelley commented 2 years ago

Looks great! Thank you!

Can you please run yarn build, and commit the resulting index.js file? That will pickup your updates and bundle them into the js file that the action runs. Alternatively I can also do this if you don't have the tooling to do the build

IsjaslawEisenstadt commented 2 years ago

Done. I've also noticed during the build, that replaceAll isn't supported. So I opted for two replace commands instead.

firebelley commented 2 years ago

Thanks! New version will be out shortly!