versioning with normal build

This commit is contained in:
Wagyourtail 2022-06-03 14:24:17 -06:00
parent 4dba5a4399
commit ffbe683e86
No known key found for this signature in database
GPG Key ID: 919725C5A647667A
3 changed files with 10 additions and 4 deletions

View File

@ -24,8 +24,8 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build -Pmod_version=$(git describe --always --tags | cut -c2-)
run: ./gradlew build
- name: Archive Artifacts
uses: actions/upload-artifact@v2
with:

View File

@ -16,7 +16,13 @@
*/
group 'baritone'
version project.mod_version
def vers = 'git describe --always --tags --dirty'.execute().text.trim();
if (!vers.startsWith("v")) {
version project.hasProperty("mod_version") + "+" + "local_build";
} else {
version vers.substring(1)
}
buildscript {
repositories {

View File

@ -15,4 +15,4 @@
# along with Baritone. If not, see <https://www.gnu.org/licenses/>.
#
mod_version = 1.2.15-local_build
mod_version = 1.2.15