Skip to content

Commit

Permalink
fix(build): gitStatus should use Task.Input (#4168)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang-Haojin authored Jan 14, 2025
1 parent 37f33e1 commit 63e777d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ object xiangshan extends XiangShanModule with HasChisel with ScalafmtModule {
LocalDateTime.now().format(DateTimeFormatter.ofPattern("MMM dd hh:mm:ss yyyy").withLocale(new Locale("en")))),
)

def gitStatus: T[String] = {
// gitStatus changes frequently and unpredictably. Use `Task.Input` here.
def gitStatus: T[String] = Task.Input {
val gitRevParseBuilder = new ProcessBuilder("git", "rev-parse", "HEAD")
val gitRevParseProcess = gitRevParseBuilder.start()
val shaReader = new BufferedReader(new InputStreamReader(gitRevParseProcess.getInputStream))
Expand Down

0 comments on commit 63e777d

Please sign in to comment.