This repository was archived by the owner on Dec 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ 'use strict' ;
3+
4+ // register coffeescript
5+ require ( 'coffeescript/register' ) ;
6+
7+ const versionCheck = require ( '../lib/main' ) ;
8+ const options = {
9+ repo : 'github-version-checker' ,
10+ owner : 'axelrindle' ,
11+ currentVersion : require ( '../package.json' ) . version
12+ } ;
13+
14+ versionCheck ( options )
15+ . then ( update => {
16+ if ( update ) { // update is null if there is no update available, so check here
17+ console . log ( "An update is available! " + update . name ) ;
18+ console . log ( "You are on version " + options . currentVersion + "!" ) ;
19+ } else {
20+ console . log ( "You are up to date." ) ;
21+ }
22+ } )
23+ . catch ( error => {
24+ console . error ( error ) ;
25+ } ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ module.exports = (options, callback) ->
3232###
3333check = (options , callback ) ->
3434 # get options
35- token = options .token ? ' '
35+ token = options .token ? process . env . GITHUB_API_TOKEN ? ' '
3636 repo = options .repo ? ' '
3737 owner = options .owner ? ' '
3838 currentVersion = options .currentVersion ? ' '
You can’t perform that action at this time.
0 commit comments