Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
raphael.kubo.da.costa 62e298d3c8 gn: Point to process_version_rc_template() from process_version()'s docs
The documentation for process_version()'s |template_file| argument was
outdated and corresponded to a previous iteration of
https://codereview.chromium.org/2341673003

Update the docs and point to where the rc_template template currently
is.

R=brettw@chromium.org,dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2350953006
Cr-Original-Commit-Position: refs/heads/master@{#419818}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 73326001a1ce814fef68e64b28dc2f17fdcc18a8
2016-09-20 18:23:24 +00:00
raphael.kubo.da.costa f73c6cd905 gn: Generalize process_version() and move it to build/util (take #2)
(Compared to https://codereview.chromium.org/2308313003/, this version
fixes chrome/installer/linux/BUILD.gn by including all required files)

There is nothing really chrome-specific in the process_version()
template, and if we stop always passing some files in chrome/ on every
invocation it is possible to generalize it and move it to build/util
instead (and fix some layering violation comments along the way).

Compared to its previous incarnation, process_version() no longer passes
LASTCHANGE, BRANDING and VERSION automatically to version.py. This makes
it easier for callers to specify their own |sources| with values that
may override those set in those 3 files.

A new wrapper, process_version_rc_template(), was introduced to cater
for callers (generally Windows ones) who need to process a .rc.version
file that requires the values from LASTCHANGE, BRANDING and VERSION. It
always passes those 3 files to process_version() before any optional
additional |sources|, and |template_file| defaults to
chrome_version.rc.version.
Since this template depends on files from //chrome, it lives in the
newly-added //chrome/process_version_rc_template.gni.

R=dpranke@chromium.org,brettw@chromium.org,phajdan.jr@chromium.org,ddorwin@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng

Review-Url: https://codereview.chromium.org/2341673003
Cr-Original-Commit-Position: refs/heads/master@{#419377}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dc683d2a5c9af8b55245ce5ab2253d0b6977ccfb
2016-09-17 19:42:59 +00:00
yutak b5e81eb16f Revert of gn: Generalize process_version() and move it to build/util (patchset #4 id:60001 of https://codereview.chromium.org/2308313003/ )
Reason for revert:
This appears to cause compile errors on
"Google Chrome Linux x64", closing the main waterfall.

https://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Linux%20x64/builds/13577

FAILED: installer/version.txt
python ../../build/util/version.py --official -f ../../chrome/VERSION -f ../../chrome/app/theme/google_chrome/BRANDING -o installer/version.txt
Traceback (most recent call last):
  File "../../build/util/version.py", line 170, in <module>
    sys.exit(main())
  File "../../build/util/version.py", line 159, in main
    """ % values
KeyError: 'LASTCHANGE'

Original issue's description:
> There is nothing really chrome-specific in the process_version()
> template, and if we stop always passing some files in chrome/ on every
> invocation it is possible to generalize it and move it to build/util
> instead (and fix some layering violation comments along the way).
>
> Compared to its previous incarnation, process_version() no longer passes
> LASTCHANGE, BRANDING and VERSION automatically to version.py. This makes
> it easier for callers to specify their own |sources| with values that
> may override those set in those 3 files.
>
> A new wrapper, process_version_rc_template(), was introduced to cater
> for callers (generally Windows ones) who need to process a .rc.version
> file that requires the values from LASTCHANGE, BRANDING and VERSION. It
> always passes those 3 files to process_version() before any optional
> additional |sources|, and |template_file| defaults to
> chrome_version.rc.version.
> Since this template depends on files from //chrome, it lives in the
> newly-added //chrome/process_version_rc_template.gni.
>
> R=dpranke@chromium.org,brettw@chromium.org
>
> Committed: https://crrev.com/cf276fc41653b2830a5ec796d4db09b199754677
> Cr-Commit-Position: refs/heads/master@{#418514}

TBR=phajdan.jr@chromium.org,brettw@chromium.org,ddorwin@chromium.org,dpranke@chromium.org,xhwang@chromium.org,raphael.kubo.da.costa@intel.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2338093003
Cr-Original-Commit-Position: refs/heads/master@{#418519}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b4efc387bb10eef38bbd8cb20a79802e508dd1ba
2016-09-14 09:49:16 +00:00
raphael.kubo.da.costa 98b10b13ce There is nothing really chrome-specific in the process_version()
template, and if we stop always passing some files in chrome/ on every
invocation it is possible to generalize it and move it to build/util
instead (and fix some layering violation comments along the way).

Compared to its previous incarnation, process_version() no longer passes
LASTCHANGE, BRANDING and VERSION automatically to version.py. This makes
it easier for callers to specify their own |sources| with values that
may override those set in those 3 files.

A new wrapper, process_version_rc_template(), was introduced to cater
for callers (generally Windows ones) who need to process a .rc.version
file that requires the values from LASTCHANGE, BRANDING and VERSION. It
always passes those 3 files to process_version() before any optional
additional |sources|, and |template_file| defaults to
chrome_version.rc.version.
Since this template depends on files from //chrome, it lives in the
newly-added //chrome/process_version_rc_template.gni.

R=dpranke@chromium.org,brettw@chromium.org

Review-Url: https://codereview.chromium.org/2308313003
Cr-Original-Commit-Position: refs/heads/master@{#418514}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cf276fc41653b2830a5ec796d4db09b199754677
2016-09-14 08:56:48 +00:00