mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2025-12-27 04:58:17 +00:00
Update test to support Windows
This commit is contained in:
parent
5c67e25f43
commit
65140edf77
1 changed files with 5 additions and 1 deletions
|
|
@ -36,7 +36,11 @@ const createTestRepo = (inputs) => {
|
|||
return {
|
||||
clean: () => execute(os.tmpdir(), `rm -rf ${repoDirectory}`),
|
||||
makeCommit: (msg, path) => {
|
||||
run(`touch ${path !== undefined ? path.trim('/') + '/' : ''}test${i++}`);
|
||||
if (process.platform === "win32") {
|
||||
run(`fsutil file createnew ${path !== undefined ? path.trim('/') + '/' : ''}test${i++} 0`);
|
||||
} else {
|
||||
run(`touch ${path !== undefined ? path.trim('/') + '/' : ''}test${i++}`);
|
||||
}
|
||||
run(`git add --all`);
|
||||
run(`git commit -m "${msg}"`);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue