Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_gitreleaseinfo.sas File Reference

Pulls latest release info from a GIT repository. More...

Go to the source code of this file.

Detailed Description

Useful for grabbing the latest version number or other attributes from a GIT server. Supported providers are GitLab and GitHub. Pull requests are welcome if you'd like to see additional providers!

Note that each provider provides slightly different JSON output. Therefore the macro simply extracts the JSON and assigns the libname (using the JSON engine).

Example usage (eg, to grab latest release version from github):

%mp_gitreleaseinfo(GITHUB,sasjs/core,outlib=mylibref)

data _null_;
  set mylibref.root;
  putlog TAG_NAME=;
run;
Parameters
[in]providerThe GIT provider for the release info. Accepted values:
  • GITLAB
  • GITHUB - Tables include root, assets, author, alldata
[in]projectThe link to the repository. This has different formats depending on the vendor:
  • GITHUB - org/repo, eg sasjs/core
  • GITLAB - project, eg 1343223
[in]server=(0) If your repo is self-hosted, then provide the domain here. Otherwise it will default to the provider domain (eg gitlab.com).
[in]mdebug=(0) Set to 1 to enable DEBUG messages
[out]outlib=(GITREL) The JSON-engine libref to be created, which will point at the returned JSON

SAS Macros

Related Files

Definition in file mp_gitreleaseinfo.sas.