chore(release): auto-increment android versionCode and fix CLI version output
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"cli": {
|
"cli": {
|
||||||
"version": ">= 14.0.0"
|
"version": ">= 14.0.0",
|
||||||
|
"appVersionSource": "remote"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"development": {
|
"development": {
|
||||||
@@ -18,6 +19,9 @@
|
|||||||
"channel": "production",
|
"channel": "production",
|
||||||
"env": {
|
"env": {
|
||||||
"APP_VARIANT": "production"
|
"APP_VARIANT": "production"
|
||||||
|
},
|
||||||
|
"android": {
|
||||||
|
"autoIncrement": "versionCode"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"production-apk": {
|
"production-apk": {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Command } from 'commander'
|
import { Command } from 'commander'
|
||||||
|
import { createRequire } from 'node:module'
|
||||||
import { createAgentCommand } from './commands/agent/index.js'
|
import { createAgentCommand } from './commands/agent/index.js'
|
||||||
import { createDaemonCommand } from './commands/daemon/index.js'
|
import { createDaemonCommand } from './commands/daemon/index.js'
|
||||||
import { createPermitCommand } from './commands/permit/index.js'
|
import { createPermitCommand } from './commands/permit/index.js'
|
||||||
@@ -20,7 +21,9 @@ import { runUpdateCommand } from './commands/agent/update.js'
|
|||||||
import { withOutput } from './output/index.js'
|
import { withOutput } from './output/index.js'
|
||||||
import { onboardCommand } from './commands/onboard.js'
|
import { onboardCommand } from './commands/onboard.js'
|
||||||
|
|
||||||
const VERSION = '0.1.0'
|
const require = createRequire(import.meta.url)
|
||||||
|
const packageJson = require('../package.json') as { version?: string }
|
||||||
|
const VERSION = typeof packageJson.version === 'string' ? packageJson.version : '0.0.0'
|
||||||
|
|
||||||
// Helper function to collect multiple option values into an array
|
// Helper function to collect multiple option values into an array
|
||||||
function collectMultiple(value: string, previous: string[]): string[] {
|
function collectMultiple(value: string, previous: string[]): string[] {
|
||||||
|
|||||||
Reference in New Issue
Block a user