Template:VARDEFINE GIT: Difference between revisions

From Variscite Wiki
(Created page with "{{#vardefine:{{{NAME}}}_GIT|{{{GIT}}}/{{{REPO}}} <!-- -->{{#vardefine:{{{NAME}}}_HTTP|{{{HTTP}}}/{{{REPO}}} <!-- -->{{#vardefine:{{{NAME}}}_BRANCH|{{{BRANCH}}}}} <!-- -->{{#va...")
 
(Add {{#var:NAME}}_REPO as a copy of {{#var:NAME}}_REPO, fixes pages like https://variwiki.com/index.php?title=SWUpdate_Guide&release=mx93-yocto-langdale-6.1.1_1.0.1-v1.3#Create_a_SWUpdate-ready_Image that require it.)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:{{{NAME}}}_GIT|{{{GIT}}}/{{{REPO}}} <!--
<!--
-->{{#vardefine:{{{NAME}}}_HTTP|{{{HTTP}}}/{{{REPO}}} <!--
Arguments:
-->{{#vardefine:{{{NAME}}}_BRANCH|{{{BRANCH}}}}} <!--
  NAME: Variable prefex, e.g. U-BOOT_
-->{{#vardefine:{{{NAME}}}_COMMIT|{{{COMMIT}}}}}
  REPO: Git repository, e.g. ti-u-boot
  GIT: Git parent directory, e.g. https://github.com/nsdrude-varigit-staging/
  HTTP: Optional path to html Git parent directory, e.g. https://github.com/nsdrude-varigit-staging/
      If empty, will default to GIT paremeter
  BRANCH: Git branch, e.g. ti-u-boot-2021.01_var01
 
Creates variables prefixed with the NAME variable:
  {{#var:NAME}} = REPO name
  {{#var:NAME}}_GIT
  {{#var:NAME}}_BRANCH
  {{#var:NAME}}_COMMIT
  {{#var:NAME}}_REPO
  {{#var:NAME}}_HTTP
--><includeonly><!--
-->{{#vardefine:{{{NAME}}}|{{{REPO}}}}}<!--
-->{{#vardefine:{{{NAME}}}_GIT|{{{GIT}}}/{{{REPO}}}}}<!--
-->{{#vardefine:{{{NAME}}}_BRANCH|{{{BRANCH}}}}}<!--
-->{{#vardefine:{{{NAME}}}_COMMIT|{{{COMMIT}}}}}<!--
-->{{#vardefine:{{{NAME}}}_REPO|{{{REPO}}}}}<!--
 
Use GIT URL for HTTP if HTTP is not provided
 
-->{{#ifeq: {{{HTTP|}}} | |
{{#vardefine:{{{NAME}}}_HTTP|{{{GIT}}}/{{{REPO}}}}}
|
{{#vardefine:{{{NAME}}}_HTTP|{{{HTTP}}}/{{{REPO}}}}}
}}</includeonly>

Latest revision as of 16:21, 16 October 2023