Created
August 2, 2018 06:05
-
-
Save qodunpob/0943804c395a67f55234dc4cb95939e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* temporary directory for the builds repository */ | |
const tempDir = join(rootDir, 'temp'); | |
if (existsSync(tempDir)) { | |
spawnSync('rm', ['-rf', 'temp'], getSpawnOptions(rootDir)); | |
} | |
mkdirSync(tempDir); | |
/* getting parameters from the package.json */ | |
const { name, version, repository } = require(join(rootDir, 'package.json')); | |
const originUrl = repository.url.replace(`${name}-source`, name); | |
spawnSync('git', ['init'], getSpawnOptions(tempDir)); | |
spawnSync('git', ['remote', 'add', 'origin', originUrl], getSpawnOptions(tempDir)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment