-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor/versioning #12
Conversation
bin/add-version.sh
Outdated
|
||
docker run -it --rm --name my-maven-project -v "$HOME/.m2":/root/.m2 -v `pwd`:/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-8 mvn clean package exec:java -Dexec.mainClass="com.pokebattler.gamemaster.GenerateJSON" -Dexec.args="${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json" | ||
java -Dexec.mainClass="com.pokebattler.gamemaster.GenerateJSON" -Dexec.args="${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the error
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
...
@celandro you know how I the command should be called correctly to generate the GAME_MASTER.json?
bin/add-version.sh
Outdated
|
||
docker run -it --rm --name my-maven-project -v "$HOME/.m2":/root/.m2 -v `pwd`:/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-8 mvn clean package exec:java -Dexec.mainClass="com.pokebattler.gamemaster.GenerateJSON" -Dexec.args="${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json" | ||
java -cp target/pokemongo-game-master-2.28.1.jar com.pokebattler.gamemaster.GenerateJSON "${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the following error:
Error: Could not find or load main class com.pokebattler.gamemaster.GenerateJSON
Anyone knows a fix? @celandro
by calling
docker build -t "$USER/pokemongo-game-master" .
docker run \
-v versions:/var/lib/pokemongo-game-master/versions \
-it "$USER/pokemongo-game-master" \
-f ./versions/0.57.1/GAME_MASTER.protobuf -v "0.69.9"
I can look tonight. But you probably aren't including the jar file
…On Mon, Jul 9, 2018, 9:48 AM Livio Brunner ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In bin/add-version.sh
<#12 (comment)>
:
>
-docker run -it --rm --name my-maven-project -v "$HOME/.m2":/root/.m2 -v `pwd`:/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-8 mvn clean package exec:java -Dexec.mainClass="com.pokebattler.gamemaster.GenerateJSON" -Dexec.args="${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json"
+java -Dexec.mainClass="com.pokebattler.gamemaster.GenerateJSON" -Dexec.args="${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json"
Getting the error
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
...
@celandro <https://github.com/celandro> you know how I the command should
be called correctly to generate the GAME_MASTER.json?
------------------------------
In bin/add-version.sh
<#12 (comment)>
:
>
-docker run -it --rm --name my-maven-project -v "$HOME/.m2":/root/.m2 -v `pwd`:/usr/src/mymaven -w /usr/src/mymaven maven:3.2-jdk-8 mvn clean package exec:java -Dexec.mainClass="com.pokebattler.gamemaster.GenerateJSON" -Dexec.args="${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json"
+java -cp target/pokemongo-game-master-2.28.1.jar com.pokebattler.gamemaster.GenerateJSON "${PROTOBUF_FILE} versions/${VERSION_TO_ADD}/GAME_MASTER.json"
I get the following error:
Error: Could not find or load main class com.pokebattler.gamemaster.GenerateJSON
Anyone knows a fix?
by calling
docker build -t "$USER/pokemongo-game-master" .
docker run \
-v versions:/var/lib/pokemongo-game-master/versions \
-it "$USER/pokemongo-game-master" \
-f ./versions/0.57.1/GAME_MASTER.protobuf -v "0.69.9"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAX4gD3HbY-7-mpaR04obluL5TdhrjKeks5uE4lggaJpZM4VH_OG>
.
|
@celandro I've fixed it, but it is not really efficient at the moment. I'm currently calling |
I've changed the For example, when calling the |
0b3fe61
to
3476932
Compare
Can someone review this PR? @celandro @dandesousa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think getting the timestamp out of the file is pretty important so it will be consistent if run on any machine with the same proto file
bin/add-version.sh
Outdated
done | ||
|
||
if [ "${PROTOBUF_FILE}" == "" ]; then | ||
print_error_and_exit "Missing protobuf file" | ||
fi | ||
|
||
if [ "${VERSION_TO_ADD}" == "" ]; then | ||
print_error_and_exit "Missing version to add" | ||
if [ "${TIMESTAMP}" == "" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be better if the timestamp was grepped out of the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh missunderstood this. I thought we should not use the timestamp of the GAME_MASTER file. But it makes more sense this way, will change that
CONTRIBUTING.md
Outdated
## Generate GAME_MASTER.json | ||
|
||
You can generate a new GAME_MASTER.json using the following command. | ||
It will create a new folder `versions/0.69.9`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is now datestamp based not niantic versions
3476932
to
82c20e0
Compare
Can you review it again @celandro ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
-v "$HOME/.gitconfig:/root/.gitconfig" \ | ||
-it "$USER/pokemongo-game-master" \ | ||
-f /var/lib/pokemongo-game-master/GAME_MASTER.protobuf --latest | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add a windows version of this command when I have time. The syntax for current and home directory is a little different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if you can do that. Do not want to bother around with windows if I don't have to :)
Fix for issue #11