[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/fenix][tor-browser-81.1.1-10.0-1] 2 commits: Bug 40059: Use MOZ_BUILD_DATE for versionCode



Title: GitLab

Georg Koppen pushed to branch tor-browser-81.1.1-10.0-1 at The Tor Project / Applications / fenix

Commits:

2 changed files:

Changes:

  • app/build.gradle
    ... ... @@ -679,9 +679,12 @@ ext.updateExtensionVersion = { task, extDir ->
    679 679
             into extDir
    
    680 680
     
    
    681 681
             def systemEnvBuildDate = System.getenv('MOZ_BUILD_DATE')
    
    682
    +        // MOZ_BUILD_DATE is in the YYYYMMDDHHMMSS format. Thus, we only use a
    
    683
    +        // substring of it if it is available.
    
    682 684
             def values = ['version': AndroidComponents.VERSION + "." +
    
    683
    -                      (systemEnvBuildDate != null ? systemEnvBuildDate :
    
    684
    -                      new Date().format('MMddHHmmss'))]
    
    685
    +                      (systemEnvBuildDate != null ?
    
    686
    +                       systemEnvBuildDate.substring(4) :
    
    687
    +                       new Date().format('MMddHHmmss'))]
    
    685 688
             inputs.properties(values)
    
    686 689
             expand(values)
    
    687 690
         }
    

  • buildSrc/src/main/java/Config.kt
    ... ... @@ -47,7 +47,7 @@ object Config {
    47 47
         private val fennecBaseVersionCode by lazy {
    
    48 48
             val format = SimpleDateFormat("YYYYMMDDHHMMSS", Locale.US)
    
    49 49
             val cutoff = format.parse("20150801000000")
    
    50
    -        val build = Date()
    
    50
    +        val build = if (System.getenv("MOZ_BUILD_DATE") != null) format.parse(System.getenv("MOZ_BUILD_DATE")) else Date()
    
    51 51
     
    
    52 52
             Math.floor((build.time - cutoff.time) / (1000.0 * 60.0 * 60.0)).toInt()
    
    53 53
         }
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits