-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e579dc
commit 578fd0c
Showing
79 changed files
with
16,100 additions
and
8,484 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
!.dangerfile.js | ||
!.dangerfile.js | ||
tests/bundles |
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"incredible" | ||
] | ||
], | ||
"rules": { | ||
"unicorn/prefer-string-replace-all": 0 | ||
} | ||
} |
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 |
---|---|---|
|
@@ -16,6 +16,6 @@ | |
"lines": 95, | ||
"statements": 90, | ||
"functions": 90, | ||
"branches": 85, | ||
"branches": 80, | ||
"check-coverage": true | ||
} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"dir": "tmp/package-tests", | ||
"copy": [[ "tests/bundles", "tests/bundles" ]], | ||
"supportedNodeVersion": ">=12 <=20", | ||
"copyDefaultFiles": true | ||
} |
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,68 @@ | ||
#!./node_modules/.bin/babel-node | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
|
||
import path from 'path'; | ||
import { docopt } from 'docopt'; | ||
import verifyConditions from '../src/verifyConditions'; | ||
|
||
const doc = | ||
`Usage: | ||
test.js success --chats=<chats> [<rootDir>] | ||
test.js fail --chats=<chats> [<rootDir>] | ||
test.js verifyConditions [<rootDir>] | ||
test.js -h | --help | ||
Options: | ||
-h --help Run test with real credentials. | ||
`; | ||
|
||
const testBundles = path.resolve('tests/bundles'); | ||
const tastoriaDist = path.resolve(testBundles, 'tastoria_1.2.1/dist'); | ||
const tastoriaPackage = path.resolve(testBundles, 'tastoria_1.2.1/package.json'); | ||
|
||
const options = { | ||
repositoryUrl : 'https://github.com/pustovitDmytro/semantic-release-telegram.git', | ||
'telegra.ph' : { | ||
title : '{name} v.{version}', | ||
message : '<a href=\'{telegraph_url}\'>Release Notes</a>', | ||
content : '{release_notes}' | ||
}, | ||
assets : [ | ||
{ path: 'README.md' }, | ||
{ glob: [ '.docs/*' ], name: 'Docs.zip' } | ||
] | ||
}; | ||
const branch = { name: 'master' }; | ||
|
||
async function main(opts) { | ||
try { | ||
const rootDir = opts['<rootDir>'] || process.cwd(); | ||
|
||
if (opts.verifyConditions) { | ||
await verifyConditions.call( | ||
{}, | ||
{ | ||
type : 'q-manifest', | ||
directory : tastoriaDist, | ||
'package.json' : tastoriaPackage | ||
}, | ||
{ | ||
logger : console, | ||
env : { ...process.env }, | ||
cwd : path.resolve(rootDir), | ||
options, | ||
branch | ||
} | ||
); | ||
} | ||
|
||
process.exit(0); | ||
} catch (error) { | ||
console.error(error); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
|
||
// eslint-disable-next-line unicorn/prefer-top-level-await | ||
main(docopt(doc)); |
Oops, something went wrong.