zarro 1.160.0 → 1.162.0
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/gulp-tasks/modules/git-sha.js +4 -2
- package/package.json +1 -1
- package/types.d.ts +4 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(function () {
|
|
3
3
|
const Git = require("simple-git");
|
|
4
|
-
async function fetchGitSha(forRepo) {
|
|
4
|
+
async function fetchGitSha(forRepo, short) {
|
|
5
5
|
const git = new Git(forRepo);
|
|
6
6
|
const log = await git.log({ maxCount: 1 });
|
|
7
|
-
return
|
|
7
|
+
return !!short
|
|
8
|
+
? currentGitSha.substring(0, 7)
|
|
9
|
+
: log.latest.hash;
|
|
8
10
|
}
|
|
9
11
|
// this is a bit of an hax: we're hoping that we get some
|
|
10
12
|
// time between when this is fired off and when it's required
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -705,7 +705,10 @@ declare global {
|
|
|
705
705
|
type StatFunction = (path: string) => Promise<fs.Stats | null>
|
|
706
706
|
|
|
707
707
|
interface GitSha {
|
|
708
|
-
fetchGitSha(
|
|
708
|
+
fetchGitSha(
|
|
709
|
+
forRepo?: string,
|
|
710
|
+
short?: boolean
|
|
711
|
+
): Promise<string>;
|
|
709
712
|
|
|
710
713
|
init(): Promise<void>;
|
|
711
714
|
|