This eliminates the last Makefile in our code base.
Also change the section style within ReleaseNotes from asciidoc style to
asciidoctor style.
Also I feel that put images/link.png under ReleaseNotes and deal with
all the resource packing is too stupid, so I used the unicode emoji
instead of the picture ("🔗"). If this is too crazy, we can also use "#"
instead :) This also affects documentation rendering.
Other side effects:
1. The css of release notes switched from default asciidoc css into
default asciidoctor css.
2. The section anchors for ReleaseNotes/index.html changed from "2_13"
to "s2_13", because asciidoctorj is unhappy with anchors without
letters.
Change-Id: I4adf2ce090385cc6b699445012f10a009892aaac
		
	
		
			
				
	
	
		
			81 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
include_defs('//Documentation/asciidoc.defs')
 | 
						|
include_defs('//Documentation/config.defs')
 | 
						|
include_defs('//Documentation/license.defs')
 | 
						|
include_defs('//tools/git.defs')
 | 
						|
 | 
						|
DOC_DIR = 'Documentation'
 | 
						|
 | 
						|
JSUI_JAVA_DEPS = ['//gerrit-gwtui:ui_module']
 | 
						|
JSUI_NON_JAVA_DEPS = ['//polygerrit-ui/app:polygerrit_ui']
 | 
						|
MAIN_JAVA_DEPS = ['//gerrit-pgm:pgm']
 | 
						|
SRCS = glob(['*.txt'], excludes = ['licenses.txt'])
 | 
						|
 | 
						|
 | 
						|
genasciidoc(
 | 
						|
  name = 'html',
 | 
						|
  out = 'html.zip',
 | 
						|
  directory = DOC_DIR,
 | 
						|
  srcs = SRCS + [':licenses.txt'],
 | 
						|
  attributes = documentation_attributes(git_describe()),
 | 
						|
  backend = 'html5',
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
genasciidoc(
 | 
						|
  name = 'searchfree',
 | 
						|
  out = 'searchfree.zip',
 | 
						|
  directory = DOC_DIR,
 | 
						|
  srcs = SRCS + [':licenses.txt'],
 | 
						|
  attributes = documentation_attributes(git_describe()),
 | 
						|
  backend = 'html5',
 | 
						|
  searchbox = False,
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 | 
						|
 | 
						|
genlicenses(
 | 
						|
  name = 'licenses.txt',
 | 
						|
  opts = ['--asciidoc'],
 | 
						|
  java_deps = JSUI_JAVA_DEPS + MAIN_JAVA_DEPS,
 | 
						|
  non_java_deps = JSUI_NON_JAVA_DEPS,
 | 
						|
  out = 'licenses.txt',
 | 
						|
)
 | 
						|
 | 
						|
# Required by Google for gerrit-review.
 | 
						|
genlicenses(
 | 
						|
  name = 'js_licenses.txt',
 | 
						|
  opts = ['--partial'],
 | 
						|
  java_deps = JSUI_JAVA_DEPS,
 | 
						|
  non_java_deps = JSUI_NON_JAVA_DEPS,
 | 
						|
  out = 'js_licenses.txt',
 | 
						|
)
 | 
						|
 | 
						|
python_binary(
 | 
						|
  name = 'gen_licenses',
 | 
						|
  main = 'gen_licenses.py',
 | 
						|
)
 | 
						|
 | 
						|
python_binary(
 | 
						|
  name = 'replace_macros',
 | 
						|
  main = 'replace_macros.py',
 | 
						|
  visibility = ['//ReleaseNotes:'],
 | 
						|
)
 | 
						|
 | 
						|
genrule(
 | 
						|
  name = 'index',
 | 
						|
  cmd = '$(exe //lib/asciidoctor:doc_indexer) ' +
 | 
						|
      '-o $OUT ' +
 | 
						|
      '--prefix "%s/" ' % DOC_DIR +
 | 
						|
      '--in-ext ".txt" ' +
 | 
						|
      '--out-ext ".html" ' +
 | 
						|
      '$SRCS ' +
 | 
						|
      '$(location :licenses.txt)',
 | 
						|
  srcs = SRCS,
 | 
						|
  out = 'index.jar',
 | 
						|
)
 | 
						|
 | 
						|
prebuilt_jar(
 | 
						|
  name = 'index_lib',
 | 
						|
  binary_jar = ':index',
 | 
						|
  visibility = ['PUBLIC'],
 | 
						|
)
 |