Skip to content

Commit

Permalink
combine version information into single file
Browse files Browse the repository at this point in the history
it is annoying having to change 2 different files (Config and AppVersion) when updating Apex API version
  • Loading branch information
neowit committed Jun 17, 2023
1 parent c5b4ad7 commit 1f6706d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/scala/com/neowit/apex/AppVersion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import scala.concurrent.{ExecutionContext, Future}
object AppVersion {
val APP_NAME = "tooling-force.com"
val VERSION = "0.5.8.0"
val SFDC_API_VERSION:Double = 58.0
}
class AppVersion extends ApexAction {
protected override def act()(implicit ec: ExecutionContext): Future[ActionResult] = {
Expand Down
5 changes: 3 additions & 2 deletions src/main/scala/com/neowit/utils/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@

package com.neowit.utils

import com.neowit.apex.AppVersion

import java.util.Properties
import java.io.{File, FileWriter, OutputStream}
import java.nio.file.{Files, Paths}

import com.neowit.auth._
import com.neowit.response.ResponseWriter
import com.neowit.response.protocols.vim.ResponseWriterVim
Expand Down Expand Up @@ -222,7 +223,7 @@ regardless of whether it is also specified in config file or not

class Config(val basicConfig: BasicConfig) extends OAuth2JsonSupport with Logging{

val apiVersion:Double = 57.0
val apiVersion:Double = AppVersion.SFDC_API_VERSION

//make BasicConfig methods available in Config
def load(arglist: List[String]): Unit = {
Expand Down

0 comments on commit 1f6706d

Please sign in to comment.