Created
May 28, 2020 08:55
-
-
Save atteneder/a5acd9ae1dad5c6b5a1738e86e84783d to your computer and use it in GitHub Desktop.
Extract a Unity project's version (found in Player settings) from command line (macOS/Linux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# The current working directory has to be the root of the project | |
cd /path/to/UnityProject | |
# Extract into variable via sed | |
PROJECT_VERSION=$(sed -nE 's/bundleVersion: (.+)/\1/p' ProjectSettings/ProjectSettings.asset) | |
# Put it to use | |
echo $PROJECT_VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment