embed git sha in code to detect whether code is built from current resources #2625
Comments
|
@shane-tomlinson should that be available on some global namespace on |
|
@vladikoff - or perhaps even a comment at the top of the file. |
|
Could be done as part of #2626 |
|
from irc: the fxa-content .git repo is not deployed |
|
@shane-tomlinson - where are you not confident that the version in /ver.json does not represent the sha of the code that built it? Prod/Stage? latest? other? |
All of the above. Embedding the git sha in the code is just another way to verify expectations match reality. |
Output looks like: ```js /*! fxa-content-server@0.47.1 -- Mon Oct 12 2015 20:04:55 * * Git sha: 22cfb27e645042d1eb70e8509b2a36f8235837ff * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * For more information, see https://github.com/mozilla/fxa-content-server/ */ ``` fixes #2625
|
blocked by changes to an external script #3160 (comment) |
Output looks like: ```js /*! fxa-content-server@0.47.1 -- Mon Oct 12 2015 20:04:55 * * Git sha: 22cfb27e645042d1eb70e8509b2a36f8235837ff * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * For more information, see https://github.com/mozilla/fxa-content-server/ */ ``` fixes #2625
Hm, Not sure what happened there, did this move automatically? AFAIK the issue / pr is blocked by an external script. |
|
from meeting, @jrgm said this was ready to merge |
We have
/ver.jsonthat reports the current git sha, but I am never 100% confident the code was built from that sha. If the git sha were embedded in the code, or as part of the filename, I'd have a lot more confidence the current code is what we think it is.The text was updated successfully, but these errors were encountered: