luis %!s(int64=7) %!d(string=hai) anos
pai
achega
bdf72347a7
Modificáronse 2 ficheiros con 4 adicións e 18 borrados
  1. 4 0
      .drone.yml
  2. 0 18
      test/index.js

+ 4 - 0
.drone.yml

@@ -20,6 +20,9 @@ pipeline:
       - yarn build
   deploy:
     image: docker
+    when:
+      event: deployment
+      environment: staging
     commands:
       - echo $HOME
       - mkdir -p DIST
@@ -30,3 +33,4 @@ pipeline:
       - /var/run/docker.sock:/var/run/docker.sock
       - /home/stdio/.docker/config.json:/root/.docker/config.json
 
+

+ 0 - 18
test/index.js

@@ -1,18 +0,0 @@
-function makeid(n) {
-  var text = "";
-  var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-  const d = new Date()
-
-  text += possible[d.getMilliseconds() % possible.length]
-  text += possible[d.getSeconds()]
-  text += possible[d.getMinutes()]
-  text += possible[d.getDate()]
- 
-  for (var i = 0; i < n; i++)
-    text += possible.charAt(Math.floor(Math.random() * possible.length));
-
-  return text;
-}
-
-console.log(makeid(5))
-