Skip to content

Commit 6b48b76

Browse files
committed
refine logs
1 parent a9dbe94 commit 6b48b76

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@ jobs:
2727
with:
2828
version: ${{ matrix.version }}
2929

30-
- name: Capture Calcit
30+
- name: Try Calcit
3131
run: |
3232
cr -e "range 20"
3333
34-
- name: Clear
34+
- name: Clear bin
3535
run: |
3636
rm -rfv /home/runner/bin/
3737
38-
- name: Setup Calcit
38+
- name: Setup Calcit skip cache
3939
uses: ./
4040
with:
4141
version: ${{ matrix.version }}
4242
skipCache: true
4343

44-
- name: Capture Calcit
44+
- name: Try Calcit
4545
run: |
4646
cr -e "range 20"
4747
48-
- name: Clear
48+
- name: Clear bin
4949
run: |
5050
rm -rfv /home/runner/bin/
5151
52-
- name: Setup Calcit
52+
- name: Setup Calcit with cache
5353
uses: ./
5454
with:
5555
version: ${{ matrix.version }}

dist/index.js

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,23 @@ async function setup(bin) {
1414

1515
let url = `https://github.com/calcit-lang/calcit/releases/download/${version}/${bin}`;
1616

17-
let prevCr = tc.find(bin, version);
17+
let prevCr = tc.find(bin, version, "ubuntu");
1818
let binPath = `${binFolder}${bin}`;
1919

20+
console.log(`cache is: ${prevCr}`);
2021
if (prevCr && !skipCache) {
2122
fs.copyFileSync(prevCr, binPath);
2223
console.log(`use cached: ${prevCr}`);
2324
} else {
2425
const pathToCr = await tc.downloadTool(url, binPath);
2526
console.log(`downloaded to: ${pathToCr}`);
26-
const cachedPath = await tc.cacheFile(pathToCr, bin, bin, version);
27+
const cachedPath = await tc.cacheFile(
28+
pathToCr,
29+
bin,
30+
bin,
31+
version,
32+
"ubuntu"
33+
);
2734
console.log(`cached to: ${cachedPath}`);
2835
}
2936
fs.chmodSync(binPath, 0o755);

0 commit comments

Comments
 (0)