forked from nx-dotnet/nx-dotnet
-
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
d95a3ff
commit d4fca4d
Showing
8 changed files
with
266 additions
and
223 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,4 +1,6 @@ | ||
{ | ||
"nugetPackages": {}, | ||
"nugetPackages": { | ||
"Swashbuckle.AspNetCore": "6.5.0" | ||
}, | ||
"inferProjects": false | ||
} |
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,6 @@ | ||
{ | ||
"sdk": { | ||
"rollForward": "latestMinor", | ||
"version": "6.0.400" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,19 +1,31 @@ | ||
import { readJson } from '../../utils'; | ||
import { PublishAll } from '../publish-all'; | ||
import { publishAll } from '../publish-all'; | ||
|
||
export function main(all = false, specific?: string) { | ||
const rootPkg = readJson('package.json'); | ||
import * as parser from 'yargs-parser'; | ||
|
||
const [prev, tagSpec] = rootPkg.version.split('-'); | ||
let [tag, rev] = tagSpec ? tagSpec.split('.') : ['dev', '0']; | ||
export function main(version: string) { | ||
const rootPkg = readJson('package.json'); | ||
const [next, tagSpec]: [string, string | null] = rootPkg.version.startsWith( | ||
version, | ||
) | ||
? rootPkg.version.split('-') | ||
: [version, null]; | ||
let [tag, rev] = tagSpec ? tagSpec.split('.') : ['beta', '0']; | ||
rev = (parseInt(rev) + 1).toString(); | ||
rev = rev === 'NaN' ? '0' : rev; | ||
const newVersion = `${prev}-${tag}.${rev}`; | ||
console.log('New Version: ', { newVersion, prev, tag, rev }); | ||
const newVersion = `${next}-${tag}.${rev}`; | ||
|
||
PublishAll(newVersion, tag); | ||
publishAll(newVersion, tag); | ||
} | ||
|
||
if (require.main === module) { | ||
main(); | ||
const { version } = parser(process.argv, { | ||
string: ['version'], | ||
}) as parser.Arguments & { | ||
version: string; | ||
}; | ||
if (!version) { | ||
throw new Error('Version is required'); | ||
} | ||
main(version); | ||
} |
Oops, something went wrong.