From ea0dac27046a231e47db6eb7b6ec153471e3c298 Mon Sep 17 00:00:00 2001 From: Giles Date: Wed, 19 Aug 2020 21:01:46 +0100 Subject: [PATCH] fix: now publishes dependencies --- deploy.libsonnet | 2 +- lib/build.libsonnet | 2 +- lib/package.json | 9 +++++++++ lib/settings.libsonnet | 2 +- lib/util.libsonnet | 4 ++-- lib/yarn.lock | 13 +++++++++++++ npmignore | 1 + package.json | 6 ++++-- 8 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 lib/package.json create mode 100644 lib/yarn.lock create mode 100644 npmignore diff --git a/deploy.libsonnet b/deploy.libsonnet index d1a0fef..e387ee1 100644 --- a/deploy.libsonnet +++ b/deploy.libsonnet @@ -1,7 +1,7 @@ local build = import 'lib/build.libsonnet'; local images = import 'lib/images.libsonnet'; local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; -local compose = import 'node_modules/@sigyl/jsonnet-compose/compose.libsonnet'; +local compose = import 'lib/node_modules/@sigyl/jsonnet-compose/compose.libsonnet'; local util = import 'lib/util.libsonnet'; function( diff --git a/lib/build.libsonnet b/lib/build.libsonnet index 0020d62..da3c13e 100644 --- a/lib/build.libsonnet +++ b/lib/build.libsonnet @@ -1,5 +1,5 @@ local images = import 'images.libsonnet'; -local environment = import '../node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; +local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; function(secrets) images.docker { diff --git a/lib/package.json b/lib/package.json new file mode 100644 index 0000000..83dda44 --- /dev/null +++ b/lib/package.json @@ -0,0 +1,9 @@ +{ + "private": true, + "name": "@sigyl/jsonnet-drone", + "description": "jsonnet to build and deploy with drone", + "dependencies": { + "@sigyl/jsonnet-compose": "^0.0.2", + "@sigyl/jsonnet-drone-environment": "0.0.5" + } +} diff --git a/lib/settings.libsonnet b/lib/settings.libsonnet index 3c40d44..945a613 100644 --- a/lib/settings.libsonnet +++ b/lib/settings.libsonnet @@ -1,4 +1,4 @@ -local environment = import '../node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; +local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; { ssh: { settings +: { diff --git a/lib/util.libsonnet b/lib/util.libsonnet index 2596ab8..3b41b3c 100644 --- a/lib/util.libsonnet +++ b/lib/util.libsonnet @@ -1,5 +1,5 @@ -local compose = import '../node_modules/@sigyl/jsonnet-compose/compose.libsonnet'; -local environment = import '../node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; +local compose = import 'node_modules/@sigyl/jsonnet-compose/compose.libsonnet'; +local environment = import 'node_modules/@sigyl/jsonnet-drone-environment/environment.libsonnet'; { printEnv(file, env): function(step) compose([ environment.envSet(env), diff --git a/lib/yarn.lock b/lib/yarn.lock new file mode 100644 index 0000000..e9d5082 --- /dev/null +++ b/lib/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@sigyl/jsonnet-compose@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-compose/-/jsonnet-compose-0.0.2.tgz#8900a21e8cd8109929b6042703f8645aacb9bcda" + integrity sha512-wWS3CgPeNi/o1pcS6n/4pafxlMD0KC9/RKMZr/ySmzeGNRW++sPuKuxajYse2TNd47uNDdeUSnk4aEeEIKL0zA== + +"@sigyl/jsonnet-drone-environment@0.0.5": + version "0.0.5" + resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff" + integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw== diff --git a/npmignore b/npmignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/package.json b/package.json index 5b38f99..7985c9b 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,11 @@ "version": "0.0.2", "description": "jsonnet to build and deploy with drone", "scripts": { - "publish": "git push --follow-tags origin master && npm publish", + "publish-npm": "git push --follow-tags origin master && npm publish", "release": "standard-version", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "install": "cd lib && yarn", + "prePublishOnly": "cd lib && yarn" }, "repository": { "type": "git",