Editing part of text with macOS terminal commands (with terminal commands only)

Viewed 22

I have a class where I get the versionCode as below.

object Dev: Variants {
     override val versionCode = 7
     override val versionName = "1.0"
}

I want to automatically increase the versionCode value here using Fastlane for Android. I think iOS has support for this but Android doesn't.

It occurred to me to increase the versionCode value here with the terminal commands I will run through Fastlane. (Separate from the topic; I'll git commit with terminal commands later)

On macOS for example nano Dev.kt opens the file and I can edit it with the keyboard. But how can I change and save the versionCode field with purely terminal codes?

0 Answers
Related