mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-10 21:17:24 +00:00
fix: see if file exists in js
This commit is contained in:
parent
12b28bf2fa
commit
03b5ef8e4e
4 changed files with 13 additions and 86 deletions
85
.github/workflows/main.yml
vendored
85
.github/workflows/main.yml
vendored
|
|
@ -15,118 +15,33 @@ jobs:
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: ./coverage/script/coverage-final.json
|
files: ./coverage/script/coverage-final.json
|
||||||
verbose: true
|
verbose: true
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
files: ./coverage/script/coverage-final.json
|
|
||||||
verbose: true
|
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
files: ./coverage/script/coverage-final.json
|
|
||||||
verbose: true
|
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
- name: Upload coverage to Codecov (script)
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
files: ./coverage/script/coverage-final.json
|
|
||||||
verbose: true
|
|
||||||
- name: Does codecov.exe exist?
|
|
||||||
run: |
|
|
||||||
if [[ -f D:\a\codecov-action\codecov-action\dist\codecov.exe ]]; then
|
|
||||||
echo "it exists!"
|
|
||||||
else
|
|
||||||
echo "it does not exist"
|
|
||||||
fi
|
|
||||||
|
|
|
||||||
6
dist/index.js
vendored
6
dist/index.js
vendored
|
|
@ -24598,6 +24598,12 @@ try {
|
||||||
const filename = external_path_.join(__dirname, getUploaderName(platform));
|
const filename = external_path_.join(__dirname, getUploaderName(platform));
|
||||||
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
external_https_.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
|
if (external_fs_.existsSync(filename)) {
|
||||||
|
core.info('IT EXISTS');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
core.info('IT DOESNT EXIST');
|
||||||
|
}
|
||||||
const filePath = external_fs_.createWriteStream(filename);
|
const filePath = external_fs_.createWriteStream(filename);
|
||||||
res.pipe(filePath);
|
res.pipe(filePath);
|
||||||
filePath
|
filePath
|
||||||
|
|
|
||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -25,6 +25,12 @@ try {
|
||||||
const filename = path.join( __dirname, getUploaderName(platform));
|
const filename = path.join( __dirname, getUploaderName(platform));
|
||||||
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
https.get(getBaseUrl(platform, uploaderVersion), (res) => {
|
||||||
// Image will be stored at this path
|
// Image will be stored at this path
|
||||||
|
|
||||||
|
if (fs.existsSync(filename)) {
|
||||||
|
core.info('IT EXISTS');
|
||||||
|
} else {
|
||||||
|
core.info('IT DOESNT EXIST');
|
||||||
|
}
|
||||||
const filePath = fs.createWriteStream(filename);
|
const filePath = fs.createWriteStream(filename);
|
||||||
res.pipe(filePath);
|
res.pipe(filePath);
|
||||||
filePath
|
filePath
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue