-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefan Wimmer
committed
Jul 16, 2016
1 parent
a17b1e7
commit 96827f6
Showing
7 changed files
with
72 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
# MoreFood | ||
|
||
All releases are currently located here: [MoreFood Releases](https://github.com/teammion/morefood/releases) | ||
For more information visit the [Curse Project](http://minecraft.curseforge.com/projects/tm-morefood) | ||
|
||
## How to contribute? | ||
|
||
1. Get [Git](https://git-scm.com) | ||
2. [Fork repository](https://github.com/teammion/morefood/fork) | ||
3. Clone repository using git: `git clone [your-fork-url]` | ||
4. Setup Minecraft Forge MDK: `./gardlew setupDecompWorkspace` | ||
5. Setup your IDE: `./gradlew [idea|eclipse|...]` | ||
6. Start coding | ||
7. Push to your forked repository: `git push origin master` | ||
8. [Create Pull Request](https://github.com/teammion/morefood/compare) | ||
9. Repeate steps 6 to 9 | ||
1. To update your code add upstream-remote `git remote add upstream https://github.com/teammion/morefood.git` (This is only needed once) | ||
2. To update from upstram-remote: `git pull upstream master` | ||
### Prerequisites | ||
|
||
- Node, NPM | ||
- Git (On windows: Git Bash) | ||
|
||
### How to do it | ||
|
||
Since I'm using a customized build system, I should tell you how to use it. | ||
|
||
``` bash | ||
# Setup gradle workspace and configure for IDE | ||
npm run setup | ||
|
||
# Run Minecraft Client | ||
npm run client | ||
|
||
# Run Minecraft Server | ||
npm run server | ||
|
||
# Build project | ||
npm run build | ||
``` | ||
|
||
The version must be changed in the "package.json" file. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Get version | ||
version="$(node <<< "console.log(require(\"./package.json\").version);")" | ||
# Update | ||
npm run update | ||
|
||
# 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 | ||
# Executing gradlew | ||
echo "Executing gradlew..." | ||
./gradlew clean build |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Update | ||
npm run update | ||
sed -i "/group = */c\group = \"io.teammion.morefood\"" build.gradle | ||
sed -i "/group= */c\group = \"io.teammion.morefood\"" build.gradle | ||
sed -i "/archivesBaseName = */c\archivesBaseName = \"morefood\"" build.gradle | ||
|
||
# IDE to configure for | ||
read -p "IDE to configure for: [idea|eclipse] " ide | ||
if [ ! "${ide,,}" == "idea" ] && [ ! "${ide,,}" == "eclipse" ] | ||
then | ||
ide="" | ||
echo "No valid IDE! No IDE will be configured." | ||
fi | ||
|
||
# Executing gradlew | ||
echo "Executing gradlew..." | ||
JAVA_OPTS="-Xmx2g" ./gradlew setupDecompWorkspace $ide |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Get version | ||
version="$(node <<< "console.log(require(\"./package.json\").version);")" | ||
echo "Version: $version" | ||
# Update build.gradle | ||
echo "Updating build.gradle..." | ||
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 |