Feature/gradle logging - #89
Conversation
…operties file with a version property
|
|
||
| # GVersion build constants | ||
| src/main/java/frc/robot/BuildConstants.java No newline at end of file |
There was a problem hiding this comment.
Just a suggestion,
why not just ignore */BuildConstants.java so that we can change the directory for it later on if needed
| if (project.gradle.startParameter.taskNames.any({ it.toLowerCase().contains("deploy") })) { | ||
| def branchPrefix = "event" | ||
| def branch = 'git branch --show-current'.execute().text.trim() | ||
| def commitMessage = "Update at '${new Date().toString()}'" | ||
|
|
||
| if (branch.startsWith(branchPrefix)) { | ||
| exec { | ||
| workingDir(projectDir) | ||
| executable 'git' | ||
| args 'add', '-A' | ||
| } | ||
| exec { | ||
| workingDir(projectDir) | ||
| executable 'git' | ||
| args 'commit', '-m', commitMessage | ||
| ignoreExitValue = true | ||
| } | ||
|
|
||
| println "Committed to branch: '$branch'" | ||
| println "Commit message: '$commitMessage'" | ||
| } else { | ||
| println "Not on an event branch, skipping commit" | ||
| } |
There was a problem hiding this comment.
I'd personally prefer to not do automatic commit messages, they don't explain your changes
due to it being a event branch specificically, maybe prompt the user to input a commit message instead of an automatic one
| } else { | ||
| println "Not running deploy task, skipping commit" | ||
| } |
There was a problem hiding this comment.
No need to prompt the user that a action that wasn't suppoused to happen indeed didn't happen, should only prompt when it fails / does happen
| Monologue.log("Maven Group", BuildConstants.MAVEN_GROUP); | ||
| Monologue.log("Maven Name", BuildConstants.MAVEN_NAME); | ||
| Monologue.log("Version", BuildConstants.VERSION); | ||
| Monologue.log("Git Revision", BuildConstants.GIT_REVISION); | ||
| Monologue.log("Git SHA", BuildConstants.GIT_SHA); | ||
| Monologue.log("Git Date", BuildConstants.GIT_DATE); | ||
| Monologue.log("Branch", BuildConstants.GIT_BRANCH); | ||
| Monologue.log("Build Date", BuildConstants.BUILD_DATE); | ||
| Monologue.log("Build Unix Time", BuildConstants.BUILD_UNIX_TIME); | ||
| Monologue.log("Dirty", BuildConstants.DIRTY); |
There was a problem hiding this comment.
If I'm not mistaken monolouge allows for custom classes to be able to be logged,
Geometry.java from the example repo
| @@ -0,0 +1 @@ | |||
| version = 1.0.0 No newline at end of file | |||
There was a problem hiding this comment.
Why was this added? Can't it make use of the github tags?
No description provided.