Skip to content

Commit 8826296

Browse files
author
github-actions
committed
fix version string
[TRANSFER][PUBLISH]
1 parent aa02250 commit 8826296

File tree

291 files changed

+11
-65843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+11
-65843
lines changed

README.md

Lines changed: 0 additions & 272 deletions
This file was deleted.

build/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build-single-exchange": "tsx build.ts",
88
"pypi-packager": "tsx pypi-packager.ts",
9+
910
"sample-generate": "cd ../.github/scripts/ && bash generate-exchange-skeleton.sh ../../../tmp_folder kucoin",
1011
"sample-build": "cd ../../tmp_folder/build && npm run build-single-exchange",
1112
"sample-pypi": "cd ../../tmp_folder/build && npm run pypi-packager",
@@ -16,8 +17,7 @@
1617
"dependencies": {
1718
"fs": "*",
1819
"path": "*",
19-
"semver": "^7.7.1",
20-
"typescript": "^5.8.2"
20+
"semver": "^7.7.1"
2121
},
2222
"devDependencies": {
2323
"tsx": "^4.19.3"

build/pypi-packager.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import * as semver from 'semver';
55
import { argvs, sanitizePackageName, mkdir, jsonFromFile, exchangeArgv, execSync, cp, capitalize, regexAll } from './utils';
66

77
import { fileURLToPath } from 'url';
8-
// @ts-expect-error
98
const __dirname = path.dirname(fileURLToPath(import.meta.url));
109

1110

@@ -87,7 +86,15 @@ class pypi {
8786
const versions = res.toString().trim();
8887
const matches = versions.match(/\((\S+)\)/);
8988
// @ts-ignore
90-
const currentVersion = matches[1] || '0.0.1'; // if new package and not found
89+
let currentVersion = matches[1];
90+
if (!currentVersion) {
91+
currentVersion = '0.0.1';
92+
} else {
93+
// some weird values, e.g. 123.0 or alike
94+
if ((currentVersion.match(/\./g) || []).length < 2) {
95+
currentVersion += '.0';
96+
}
97+
}
9198
const newVersion = semver.inc(currentVersion, 'patch');
9299
return newVersion;
93100
}

examples/async.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/sync.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)