@@ -65,7 +65,7 @@ const args = flags.parse(Deno.args, {
65
65
} )
66
66
67
67
if ( args . help ) {
68
- console . log ( HELP )
68
+ console . info ( HELP )
69
69
Deno . exit ( )
70
70
}
71
71
@@ -103,7 +103,7 @@ const oldCommit = /COMMIT="?([a-f0-9]+)"?/.exec(oldVersionFile)?.[1]
103
103
if ( ! oldCommit ) throw Error ( 'Could not parse existing version file' )
104
104
105
105
if ( oldCommit === newCommit ) {
106
- console . log ( 'Nothing to update: Omicron already has the current commit pinned' )
106
+ console . info ( 'Nothing to update: Omicron already has the current commit pinned' )
107
107
Deno . exit ( )
108
108
}
109
109
@@ -118,7 +118,7 @@ const changesLine = `https://github.com/oxidecomputer/console/compare/${commitRa
118
118
const branchName = 'bump-console-' + newCommit . slice ( 0 , 8 )
119
119
const prBody = `${ changesLine } \n\n${ commitsMarkdown } `
120
120
121
- console . log ( `\n${ changesLine } \n\n${ commits } \n` )
121
+ console . info ( `\n${ changesLine } \n\n${ commits } \n` )
122
122
123
123
if ( args . dryRun ) Deno . exit ( )
124
124
@@ -131,15 +131,15 @@ const message =
131
131
132
132
const prTitle = 'Bump web console' + ( message ? ` (${ message } )` : '' )
133
133
134
- console . log ( `\nPR title: ${ prTitle } \n` )
134
+ console . info ( `\nPR title: ${ prTitle } \n` )
135
135
136
136
const go = await $ . confirm ( { message : 'Make Omicron PR?' , noClear : true } )
137
137
if ( ! go ) Deno . exit ( )
138
138
139
139
if ( ! $ . commandExistsSync ( 'gh' ) ) throw Error ( GH_MISSING )
140
140
141
141
await Deno . writeTextFile ( VERSION_FILE , newVersionFile )
142
- console . log ( 'Updated ' , VERSION_FILE )
142
+ console . info ( 'Updated ' , VERSION_FILE )
143
143
144
144
const consoleDir = Deno . cwd ( )
145
145
@@ -149,28 +149,28 @@ Deno.chdir(OMICRON_DIR)
149
149
await $ `git checkout main`
150
150
await $ `git pull`
151
151
await $ `git checkout -b ${ branchName } `
152
- console . log ( 'Created branch' , branchName )
152
+ console . info ( 'Created branch' , branchName )
153
153
154
154
await $ `git add tools/console_version`
155
155
await $ `git commit -m ${ prTitle } -m ${ prBody } `
156
156
await $ `git push --set-upstream origin ${ branchName } `
157
- console . log ( 'Committed changes and pushed' )
157
+ console . info ( 'Committed changes and pushed' )
158
158
159
159
// create PR
160
160
const prUrl = await $ `gh pr create --title ${ prTitle } --body ${ prBody } ` . text ( )
161
- console . log ( 'PR created:' , prUrl )
161
+ console . info ( 'PR created:' , prUrl )
162
162
163
163
// set it to auto merge
164
164
const prNum = prUrl . match ( / \d + $ / ) ! [ 0 ]
165
165
await $ `gh pr merge ${ prNum } --auto --squash`
166
- console . log ( 'PR set to auto-merge when CI passes' )
166
+ console . info ( 'PR set to auto-merge when CI passes' )
167
167
168
168
await $ `git checkout main`
169
169
await $ `git branch -D ${ branchName } `
170
- console . log ( 'Checked out omicron main, deleted branch' , branchName )
170
+ console . info ( 'Checked out omicron main, deleted branch' , branchName )
171
171
172
172
// bump omicron tag in console to current commit
173
173
Deno . chdir ( consoleDir )
174
- console . log ( 'Bumping omicron tag in console' )
174
+ console . info ( 'Bumping omicron tag in console' )
175
175
await $ `git tag -f -a omicron -m 'pinned commit on omicron main'`
176
176
await $ `git push -f origin tag omicron`
0 commit comments