Template:VARDEFINE GIT: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#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}}}}}</includeonly>
  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}}_GIT
  {{#var:NAME}}_BRANCH
  {{#var:NAME}}_COMMIT
  {{#var:NAME}}_REPO
  {{#var:NAME}}_HTTP
-->
<includeonly>
{{#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 -->
{{#if: {{{HTTP|}}}
|
{{#vardefine:{{{NAME}}}_HTTP|{{{GIT}}}/{{{REPO}}}
|
{{#vardefine:{{{NAME}}}_HTTP|{{{HTTP}}}/{{{REPO}}}
}}
</includeonly>

Revision as of 20:54, 24 March 2023