From a17b1e7b86cb4025fb9631e812014ab788c00f96 Mon Sep 17 00:00:00 2001 From: Stefan Wimmer Date: Thu, 14 Jul 2016 00:05:18 +0200 Subject: [PATCH] New build system, Pre-release 1.0.0-rc.1 --- build.gradle | 4 ++-- build.sh | 17 +++++++++++++++++ package.json | 21 +++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100755 build.sh create mode 100644 package.json diff --git a/build.gradle b/build.gradle index 373f4da..1ef9a3f 100644 --- a/build.gradle +++ b/build.gradle @@ -20,8 +20,8 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "0.5.0" -group= "io.teammion.morefood" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +version = "1.0.0-rc.1" +group = "io.teammion.morefood" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "morefood" minecraft { diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..11b1717 --- /dev/null +++ b/build.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Get version +version="$(node <<< "console.log(require(\"./package.json\").version);")" + +# Write version +while IFS="" read line +do + if [ "${line:0:10}" == "version = " ] + then + old_version="${line}" + fi +done < build.gradle +sed -i "/${old_version}/c\version = \"${version}\"" build.gradle + +# Build +./gradlew clean build diff --git a/package.json b/package.json new file mode 100644 index 0000000..40a4ed4 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "morefood", + "version": "1.0.0-rc.1", + "description": "This Minecraft Mod will add additional food to Mincraft to provide a healthy variety.", + "scripts": { + "build": "./build.sh" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/teammion/morefood.git" + }, + "keywords": [ + "morefood" + ], + "author": "Stefan Wimmer ", + "license": "ISC", + "bugs": { + "url": "https://github.com/teammion/morefood/issues" + }, + "homepage": "https://github.com/teammion/morefood#readme" +}