This is an automated email from the ASF dual-hosted git repository.
erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-coho.git
The following commit(s) were added to refs/heads/master by this push:
new 42840df feat!: improve metadata on nightly version (#303)
42840df is described below
commit 42840dfa4c9642a866b9831734aa59b77675e9e3
Author: エリス <[email protected]>
AuthorDate: Fri May 19 19:26:28 2023 +0900
feat!: improve metadata on nightly version (#303)
---
src/nightly.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/nightly.js b/src/nightly.js
index 46f1796..30b2134 100644
--- a/src/nightly.js
+++ b/src/nightly.js
@@ -135,11 +135,11 @@ function updateRepoDependencies (repo, dependencies) {
*/
function getNightlySuffix (SHA) {
const currentDate = new Date();
- const nightlySuffix = '-nightly.' + currentDate.getUTCFullYear() + '.' +
- (currentDate.getUTCMonth() + 1) + '.' + currentDate.getUTCDate() +
- '.' + SHA;
-
- return nightlySuffix;
+ // converts "2023-05-09T18:20:32.730Z" to "20230509182032730"
+ const dateTime = currentDate.toISOString().replace(/[T|Z\-:.]/g, '');
+ // @see https://semver.org/#spec-item-10
+ // Example: -nightly+20230509182032730.sha.8d2286c9
+ return `-nightly+${dateTime}.sha.${SHA}`;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]