V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
johnsneakers
V2EX  ›  问与答

你们的客户端和服务端版本号是如何管理的

  •  
  •   johnsneakers · Sep 3, 2016 · 1753 views
    This topic created in 3528 days ago, the information mentioned may be changed or developed.

    上烂代码:

        `if(client_version > 1.0.0 || client_version < 1.0.7) {
            $conf = 'a.inc.json';
        } elseif (client_version >= 1.0.7) {
            $conf = 'a.inc.new.json';
        } else {
            $conf = 'a.inc.new.new.json';
        }`
    

    很无语的"配置管理",每次改了业务代码,需要找客户端要版本号,加一个 elseif 。想问问有没有好的方案。

    2 replies    2016-09-04 12:40:06 +08:00
    akira
        1
    akira  
       Sep 3, 2016
    conf = client_version + '/a.inc.json';
    conf = a.inc.json?v=client_version;
    smilekung
        2
    smilekung  
       Sep 4, 2016
    做个专门的配置管理服务咯
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2503 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 08:41 · PVG 16:41 · LAX 01:41 · JFK 04:41
    ♥ Do have faith in what you're doing.