1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00

Merge pull request #399 from sasjs/uniquelibref

fix: increasing limit from 1k to 100k for mf_getuniquelibref()
This commit is contained in:
Allan Bowe
2025-06-29 13:46:57 +01:00
committed by GitHub
4 changed files with 17 additions and 14 deletions

View File

@@ -15,15 +15,4 @@ if [[ "$BRANCH" =~ ^(master|main|develop)$ ]]; then
echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?"
echo "If so, commit with -n to bypass the pre-commit hook."
exit 1
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
)
fi

View File

@@ -1121,7 +1121,7 @@ or %index(&pgm,/tests/testteardown)
@author Allan Bowe
**/
%macro mf_getuniquelibref(prefix=mclib,maxtries=1000);
%macro mf_getuniquelibref(prefix=mc,maxtries=1000);
%local x;
%if ( %length(&prefix) gt 7 ) %then %do;
@@ -24519,6 +24519,13 @@ run;
%put &sysmacroname: &name created at %mfv_getpathuri(&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;/**
@file mv_createfolder.sas
@brief Creates a viya folder if that folder does not already exist

View File

@@ -26,7 +26,7 @@
@author Allan Bowe
**/
%macro mf_getuniquelibref(prefix=mclib,maxtries=1000);
%macro mf_getuniquelibref(prefix=mc,maxtries=1000);
%local x;
%if ( %length(&prefix) gt 7 ) %then %do;

View File

@@ -244,4 +244,11 @@ run;
%put &sysmacroname: &name created at %mfv_getpathuri(&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;