-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: guide users to have GITHUB_TOKEN (#460)
- Loading branch information
Eunjae Lee
authored
Nov 27, 2019
1 parent
cfd4b2f
commit b3ae436
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import runStep from './runStep'; | ||
import { print, exitProcess } from '../util'; | ||
import { error } from '../color'; | ||
|
||
export default ({ dryRun }) => | ||
runStep({ title: 'Checking GITHUB_TOKEN' }, () => { | ||
if (process.env.GITHUB_TOKEN) { | ||
return; | ||
} | ||
print( | ||
error('You need to specify GITHUB_TOKEN as an environment variable.') | ||
); | ||
print(' 1. GITHUB_TOKEN=xxx shipjs ...'); | ||
print(' or'); | ||
print(' 2. Create a file named ".env" and put the following content:'); | ||
print(' GITHUB_TOKEN=xxx'); | ||
print(' (".env" should not be committed. Add it to ".gitignore".)'); | ||
if (!dryRun) { | ||
exitProcess(1); | ||
} | ||
}); |