Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 42f1813

Browse files
sync with develop
2 parents 7e6b257 + 914d579 commit 42f1813

File tree

6 files changed

+1265
-99
lines changed

6 files changed

+1265
-99
lines changed

bin/cli.js renamed to bin/tc-submission-cli.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
#!/usr/bin/env node
22
process.env.NODE_CONFIG_DIR = `${__dirname}/../config/`
33

4+
const program = require('commander')
45
const uploadSubmissionService = require('../src/services/uploadSubmissionService')
56
const logger = require('../src/common/logger')
67
const _ = require('lodash')
78
const fs = require('fs')
89

10+
program.on('--help', () => {
11+
console.log(`\nTopcoder CLI to create a new submission in the challenge
12+
with contents from current directory\n`)
13+
console.log(`Create a file .topcoderrc in JSON format with below details
14+
and execute command tc-submission-cli to create submission in the challenge`)
15+
console.log(`
16+
{
17+
"challengeIds": [
18+
"30095545" // at least one item here
19+
],
20+
"username": "TonyJ",
21+
"password": "******"
22+
}`)
23+
})
24+
25+
program.parse(process.argv)
26+
927
uploadSubmissionService.smart(process.cwd())
1028
.then(async (responses) => {
1129
const log = {}

0 commit comments

Comments
 (0)