[前][次][番号順一覧][スレッド一覧]

ruby-changes:57338

From: Takashi <ko1@a...>
Date: Wed, 28 Aug 2019 00:16:32 +0900 (JST)
Subject: [ruby-changes:57338] Takashi Kokubun: dd032a5fb4 (master): Make doxygen / coverage torelant to clone race

https://git.ruby-lang.org/ruby.git/commit/?id=dd032a5fb4

From dd032a5fb4dd8da59c685910b3c673439edc8c42 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Wed, 28 Aug 2019 00:13:54 +0900
Subject: Make doxygen / coverage torelant to clone race

a little.

Doing both `git clone --depth=1` and `git reset --hard ${sha}` does not
make sense (the latter command either does nothing or just fails), so I
added non-1 value as a depth.

Maybe we don't need depth=50 for pull_request and schedule, so it's 10
for now.

diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 404c606..dafc734 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -19,12 +19,12 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/coverage.yml#L19
 
       # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
       - name: Checkout ruby/ruby
-        run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
+        run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
         env:
           GITHUB_SHA: ${{ github.sha }}
         if: github.event_name == 'schedule'
       - name: Checkout a pull request
-        run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
+        run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
         env:
           GITHUB_REV: ${{ github.event.pull_request.head.sha }}
           GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
index c6b15f8..73937a2 100644
--- a/.github/workflows/doxygen.yml
+++ b/.github/workflows/doxygen.yml
@@ -19,12 +19,12 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/doxygen.yml#L19
 
       # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork.
       - name: Checkout ruby/ruby
-        run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
+        run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA"
         env:
           GITHUB_SHA: ${{ github.sha }}
         if: github.event_name == 'schedule'
       - name: Checkout a pull request
-        run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
+        run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV"
         env:
           GITHUB_REV: ${{ github.event.pull_request.head.sha }}
           GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]