Skip to content

Commit

Permalink
♻️ Remove delete option [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn committed Jan 8, 2021
1 parent c4c6e88 commit 22cc9e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ user/repo:
replace: false
```
### Don't delete non-existing file (coming soon)
```yml
user/repo:
- source: .github/workflows/lint.yml
delete: false
```
### Sync the same files to multiple repositories
```yml
Expand Down
7 changes: 2 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30165,7 +30165,6 @@ const fs = __nccwpck_require__(5747)
__nccwpck_require__(2437).config()

const REPLACE_DEFAULT = true
const DELETE_DEFAULT = false

const getVar = ({ key, default: dft, required = false, array = false }) => {
const coreVar = core.getInput(key)
Expand Down Expand Up @@ -30266,17 +30265,15 @@ const parseFiles = (files) => {
return {
source: item,
dest: item,
replace: REPLACE_DEFAULT,
delete: DELETE_DEFAULT
replace: REPLACE_DEFAULT
}
}

if (item.source !== undefined) {
return {
source: item.source,
dest: item.dest !== undefined ? item.dest : item.source,
replace: item.replace !== undefined ? item.replace : REPLACE_DEFAULT,
delete: item.delete !== undefined ? item.delete : DELETE_DEFAULT
replace: item.replace !== undefined ? item.replace : REPLACE_DEFAULT
}
}

Expand Down
7 changes: 2 additions & 5 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const fs = require('fs')
require('dotenv').config()

const REPLACE_DEFAULT = true
const DELETE_DEFAULT = false

const getVar = ({ key, default: dft, required = false, array = false }) => {
const coreVar = core.getInput(key)
Expand Down Expand Up @@ -106,17 +105,15 @@ const parseFiles = (files) => {
return {
source: item,
dest: item,
replace: REPLACE_DEFAULT,
delete: DELETE_DEFAULT
replace: REPLACE_DEFAULT
}
}

if (item.source !== undefined) {
return {
source: item.source,
dest: item.dest !== undefined ? item.dest : item.source,
replace: item.replace !== undefined ? item.replace : REPLACE_DEFAULT,
delete: item.delete !== undefined ? item.delete : DELETE_DEFAULT
replace: item.replace !== undefined ? item.replace : REPLACE_DEFAULT
}
}

Expand Down

0 comments on commit 22cc9e5

Please sign in to comment.