-
Notifications
You must be signed in to change notification settings - Fork 0
/
bump.ps1
43 lines (39 loc) · 905 Bytes
/
bump.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# note: The --package-lock-only argument will only update the package-lock.json,
# instead of checking node_modules and downloading dependencies.
# Docs: https://docs.npmjs.com/cli/v8/commands/npm-install
$option=$args[0]
$version=$args[1]
if ([string]::IsNullOrEmpty($version))
{
$version="patch"
}
Switch ($option)
{
"standalone" {
Write-Output "bumping standalone version"
Push-Location
Set-Location standalone
npm version $version
npm i --package-lock-only
Pop-Location
}
"lambda" {
Write-Output "bumping lambda version"
Push-Location
Set-Location lambda
npm version ${VERSION}
npm i --package-lock-only
Pop-Location
}
"core" {
Write-Output "bumping core version"
Push-Location
Set-Location core
npm version ${VERSION}
npm i --package-lock-only
Pop-Location
}
default {
Write-Output "unkown option"
}
}