@sasjs/core 4.43.0 → 4.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/mp_dirlist.sas +1 -2
- package/base/mp_gitadd.sas +1 -2
- package/base/mp_gitstatus.sas +5 -5
- package/base/mp_hashdirectory.sas +5 -3
- package/package.json +1 -1
package/base/mp_dirlist.sas
CHANGED
|
@@ -101,8 +101,7 @@ data &out_ds(compress=no
|
|
|
101
101
|
if did=0 then do;
|
|
102
102
|
putlog "NOTE: This directory is empty, or does not exist - &path";
|
|
103
103
|
msg=sysmsg();
|
|
104
|
-
put
|
|
105
|
-
put _all_;
|
|
104
|
+
put (_all_)(=);
|
|
106
105
|
stop;
|
|
107
106
|
end;
|
|
108
107
|
/* attribute is OS-dependent - could be "Directory" or "Directory Name" */
|
package/base/mp_gitadd.sas
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
@details Uses the output dataset from mp_gitstatus.sas to determine the files
|
|
5
5
|
that should be staged.
|
|
6
6
|
|
|
7
|
-
If STAGED
|
|
8
|
-
char column if staging all observations).
|
|
7
|
+
If `STAGED ne "TRUE"` then the file is staged.
|
|
9
8
|
|
|
10
9
|
Usage:
|
|
11
10
|
|
package/base/mp_gitstatus.sas
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
@file
|
|
3
3
|
@brief Creates a dataset with the output from `GIT_STATUS()`
|
|
4
4
|
@details Uses `git_status()` to fetch the number of changed files, then
|
|
5
|
-
iterates
|
|
6
|
-
|
|
5
|
+
iterates with `git_status_get()`, inserting all attributes into an output
|
|
6
|
+
dataset.
|
|
7
7
|
|
|
8
8
|
Usage:
|
|
9
9
|
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
%mp_gitstatus(&dir,outds=work.gitstatus)
|
|
17
17
|
|
|
18
|
-
More info on these functions is in this [helpful paper]
|
|
19
|
-
https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3057-2019.pdf
|
|
20
|
-
|
|
18
|
+
More info on these functions is in this [helpful paper]
|
|
19
|
+
(https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3057-2019.pdf)
|
|
20
|
+
by Danny Zimmerman.
|
|
21
21
|
|
|
22
22
|
@param [in] gitdir The directory containing the GIT repository
|
|
23
23
|
@param [out] outds= (work.git_status) The output dataset to create. Vars:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
create a hash for each directory also.
|
|
6
6
|
|
|
7
7
|
This makes use of the new `hashing_file()` and `hashing` functions, available
|
|
8
|
-
since 9.4m6. Interestingly,
|
|
8
|
+
since 9.4m6. Interestingly, those functions can be used in pure macro, eg:
|
|
9
9
|
|
|
10
10
|
%put %sysfunc(hashing_file(md5,/path/to/file.blob,0));
|
|
11
11
|
|
|
@@ -30,8 +30,9 @@
|
|
|
30
30
|
@li If a folder contains other folders, start from the bottom of the tree -
|
|
31
31
|
the folder hashes cascade upwards so you know immediately if there is a
|
|
32
32
|
change in a sub/sub directory
|
|
33
|
-
@li If
|
|
33
|
+
@li If a subfolder has no content (empty) then it is ignored. No hash created.
|
|
34
34
|
@li If the file is empty, it is also ignored / no hash created.
|
|
35
|
+
@li If the target directory (&inloc) is empty, &outds will also be empty
|
|
35
36
|
|
|
36
37
|
<h4> SAS Macros </h4>
|
|
37
38
|
@li mp_dirlist.sas
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
iftrue=%str(1=1)
|
|
73
74
|
)/*/STORE SOURCE*/;
|
|
74
75
|
|
|
75
|
-
%local curlevel tempds ;
|
|
76
|
+
%local curlevel tempds maxlevel;
|
|
76
77
|
|
|
77
78
|
%if not(%eval(%unquote(&iftrue))) %then %return;
|
|
78
79
|
|
|
@@ -108,6 +109,7 @@ proc sort data=&outds ;
|
|
|
108
109
|
by descending level directory file_path;
|
|
109
110
|
run;
|
|
110
111
|
|
|
112
|
+
%let maxlevel=0;
|
|
111
113
|
data _null_;
|
|
112
114
|
set &outds;
|
|
113
115
|
call symputx('maxlevel',level,'l');
|
package/package.json
CHANGED