From 1716b069e069624ef346011b331db2aafaa2bf85 Mon Sep 17 00:00:00 2001 From: Young-Flash Date: Fri, 6 Dec 2024 16:50:25 +0800 Subject: [PATCH] 2 --- .github/workflows/jobs.yml | 5 ++++- src/main.rs | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jobs.yml b/.github/workflows/jobs.yml index 8522a06..c030931 100644 --- a/.github/workflows/jobs.yml +++ b/.github/workflows/jobs.yml @@ -60,13 +60,16 @@ jobs: env UPDATE_EXPECT=1 cargo test ./target/release/moon_dashboard stat --file repos.txt + - name: Pull + run: git pull + - name: Commit run: | git config --local user.name "github-actions[bot]" git config --local user.email "github-actions[bot]@users.noreply.github.com" git add ./webapp/public/* git add ./repos.txt - git commit -m "Update data for ${{ matrix.os }}" || echo "No changes to commit" + git commit -m "Update data for ${{ matrix.os }} at $(date '+%Y-%m-%d %H:%M:%S')" || echo "No changes to commit" - name: Push changes run: git push diff --git a/src/main.rs b/src/main.rs index d6db585..33d066c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -149,6 +149,8 @@ fn get_mooncake_sources( // moonbitlang/core 0.1.0 0.2.0 let parts: Vec<&str> = s.split(' ').collect(); let name = parts[0].to_string(); + #[cfg(target_os = "windows")] + let name = name.replace('/', "\\"); let mut xs: Vec = parts[1..].iter().copied().map(|s| s.to_string()).collect(); if xs.is_empty() {