mirror of
https://github.com/sasjs/core.git
synced 2026-01-07 09:30:06 +00:00
Merge pull request #399 from sasjs/uniquelibref
fix: increasing limit from 1k to 100k for mf_getuniquelibref()
This commit is contained in:
@@ -16,14 +16,3 @@ if [[ "$BRANCH" =~ ^(master|main|develop)$ ]]; then
|
|||||||
echo "If so, commit with -n to bypass the pre-commit hook."
|
echo "If so, commit with -n to bypass the pre-commit hook."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Avoid large commits
|
|
||||||
# https://www.backblaze.com/blog/how-many-bytes-are-in-a-megabyte-really/
|
|
||||||
size_limit=$((2 * 2**20)) # 2mbs
|
|
||||||
# https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---disk-usage
|
|
||||||
commit_size=$(git rev-list --disk-usage HEAD^..HEAD)
|
|
||||||
test "$commit_size" -lt "$size_limit" || (
|
|
||||||
echo "Commit size is too large: $commit_size > $size_limit"
|
|
||||||
echo "Force commit using --no-verify"
|
|
||||||
exit 1
|
|
||||||
)
|
|
||||||
|
|||||||
9
all.sas
9
all.sas
@@ -1121,7 +1121,7 @@ or %index(&pgm,/tests/testteardown)
|
|||||||
@author Allan Bowe
|
@author Allan Bowe
|
||||||
**/
|
**/
|
||||||
|
|
||||||
%macro mf_getuniquelibref(prefix=mclib,maxtries=1000);
|
%macro mf_getuniquelibref(prefix=mc,maxtries=1000);
|
||||||
%local x;
|
%local x;
|
||||||
|
|
||||||
%if ( %length(&prefix) gt 7 ) %then %do;
|
%if ( %length(&prefix) gt 7 ) %then %do;
|
||||||
@@ -24519,6 +24519,13 @@ run;
|
|||||||
%put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
|
%put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
|
||||||
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
|
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
|
||||||
|
|
||||||
|
%if &mdebug=0 %then %do;
|
||||||
|
/* clear refs */
|
||||||
|
filename &fname1 clear;
|
||||||
|
filename &fref clear;
|
||||||
|
libname &libref2 clear;
|
||||||
|
%end;
|
||||||
|
|
||||||
%mend mv_createfile;/**
|
%mend mv_createfile;/**
|
||||||
@file mv_createfolder.sas
|
@file mv_createfolder.sas
|
||||||
@brief Creates a viya folder if that folder does not already exist
|
@brief Creates a viya folder if that folder does not already exist
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
@author Allan Bowe
|
@author Allan Bowe
|
||||||
**/
|
**/
|
||||||
|
|
||||||
%macro mf_getuniquelibref(prefix=mclib,maxtries=1000);
|
%macro mf_getuniquelibref(prefix=mc,maxtries=1000);
|
||||||
%local x;
|
%local x;
|
||||||
|
|
||||||
%if ( %length(&prefix) gt 7 ) %then %do;
|
%if ( %length(&prefix) gt 7 ) %then %do;
|
||||||
|
|||||||
@@ -244,4 +244,11 @@ run;
|
|||||||
%put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
|
%put &sysmacroname: &name created at %mfv_getpathuri(&path/&name);%put;
|
||||||
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
|
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
|
||||||
|
|
||||||
|
%if &mdebug=0 %then %do;
|
||||||
|
/* clear refs */
|
||||||
|
filename &fname1 clear;
|
||||||
|
filename &fref clear;
|
||||||
|
libname &libref2 clear;
|
||||||
|
%end;
|
||||||
|
|
||||||
%mend mv_createfile;
|
%mend mv_createfile;
|
||||||
Reference in New Issue
Block a user