Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Feature/gradle logging - #89

Open
Ionic-Bond9738 wants to merge 5 commits into
mainfrom
feature/gradle-logging
Open

Feature/gradle logging#89
Ionic-Bond9738 wants to merge 5 commits into
mainfrom
feature/gradle-logging

Conversation

@Ionic-Bond9738

Copy link
Copy Markdown
Contributor

No description provided.

@Ionic-Bond9738
Ionic-Bond9738 requested a review from DanPeled July 22, 2025 19:02
@DanPeled DanPeled removed their assignment Jul 23, 2025
Comment thread .gitignore
Comment on lines +192 to +194

# GVersion build constants
src/main/java/frc/robot/BuildConstants.java No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion,
why not just ignore */BuildConstants.java so that we can change the directory for it later on if needed

Comment thread build.gradle
Comment on lines +108 to +130
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"
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread build.gradle
Comment on lines +131 to +133
} else {
println "Not running deploy task, skipping commit"
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +74 to +83
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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not mistaken monolouge allows for custom classes to be able to be logged,
Geometry.java from the example repo

Comment thread gradle.properties
@@ -0,0 +1 @@
version = 1.0.0 No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this added? Can't it make use of the github tags?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants