From 5c595dfb058a5b0f39feed9c7443e02748f79c15 Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Sat, 3 Jul 2021 20:36:50 -0500 Subject: [PATCH] ci: fix jenkinsfile --- Jenkinsfile | 22 +++++----- package.json | 3 +- yarn.lock | 116 +++++++++++++++++++++++++-------------------------- 3 files changed, 72 insertions(+), 69 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e78d66c..ac356ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent { docker { - image 'node:14-alpine' + image 'node:14' } } @@ -12,7 +12,6 @@ pipeline { GIT_AUTHOR_EMAIL = 'jenkins@relms.dev' GIT_COMMITTER_NAME = 'JenkinsCI' GIT_COMMITTER_EMAIL = 'jenkins@relms.dev' - NODE_ENV = 'production' } stages { @@ -32,14 +31,17 @@ pipeline { stage('Publish') { steps { - echo '==========Publishing to NPM==========' - if(env.BRANCH_NAME == 'master') { - echo '==========Publishing as Development Version==========' - sh 'yarn version $(jq --raw-output ".version" package.json)-$(git rev-parse --short HEAD).$(date +%s)' - sh 'yarn npm publish --tag dev' - } else if(env.BRANCH_NAME == 'stable') { - echo '==========Publishing as Stable Version==========' - sh 'semantic-release' + script { + echo '==========Publishing to NPM==========' + if(env.BRANCH_NAME == 'master') { + echo '==========Publishing as Development Version==========' + sh 'echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc' + sh 'yarn version $(node -pe \'require("./package.json").version\')-$(git rev-parse HEAD).$(date +%s)' + sh 'npm publish --tag dev --access public' + } else if(env.BRANCH_NAME == 'stable') { + echo '==========Publishing as Stable Version==========' + sh 'semantic-release' + } } } } diff --git a/package.json b/package.json index 2116cad..bbb70c2 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "node": ">=14.*" }, "files": [ - "dist/index.js" + "dist/index.js", + "types/*" ], "scripts": { "build": "rollup -c --compact", diff --git a/yarn.lock b/yarn.lock index cbaade3..3415fc7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,64 +5,6 @@ __metadata: version: 4 cacheKey: 8 -"@argonjs/library@workspace:.": - version: 0.0.0-use.local - resolution: "@argonjs/library@workspace:." - dependencies: - "@commitlint/cli": ^12.1.4 - "@commitlint/config-conventional": ^12.1.4 - "@commitlint/cz-commitlint": ^12.1.4 - "@istanbuljs/nyc-config-typescript": ^1.0.1 - "@rollup/plugin-strip": ^2.0.1 - "@saithodev/semantic-release-gitea": ^2.1.0 - "@semantic-release/changelog": ^5.0.1 - "@semantic-release/commit-analyzer": ^8.0.1 - "@semantic-release/git": ^9.0.0 - "@semantic-release/npm": ^7.1.3 - "@semantic-release/release-notes-generator": ^9.0.3 - "@types/chai": ^4.2.19 - "@types/eslint": ^7.2.13 - "@types/mocha": ^8.2.2 - "@types/node": ^15.14.0 - "@types/rollup-plugin-progress": ^1.1.0 - "@types/rollup-plugin-size-snapshot": ^0.10.0 - "@types/semantic-release": ^17 - "@types/sinon": ^10.0.2 - "@types/source-map-support": ^0.5.3 - "@typescript-eslint/eslint-plugin": ^4.28.1 - "@typescript-eslint/parser": ^4.28.1 - "@typescript-eslint/typescript-estree": ^4.28.1 - chai: ^4.3.4 - commitizen: ^4.2.4 - eslint: ^7.29.0 - eslint-formatter-pretty: ^4.1.0 - eslint-plugin-header: ^3.1.1 - husky: ^7.0.0 - inquirer: ^8.1.1 - lint-staged: ^11.0.0 - mocha: ^9.0.1 - nyc: ^15.1.0 - pinst: ^2.0.0 - rimraf: ^3.0.2 - rollup: ^2.52.7 - rollup-plugin-analyzer: ^4.0.0 - rollup-plugin-multi-input: ^1.3.1 - rollup-plugin-progress: ^1.1.2 - rollup-plugin-size-snapshot: ^0.12.0 - rollup-plugin-sizes: ^1.0.4 - rollup-plugin-terser: ^7.0.2 - rollup-plugin-typescript2: ^0.30.0 - rollup-plugin-visualizer: ^5.5.1 - semantic-release: ^17.4.4 - sinon: ^11.1.1 - source-map-support: ^0.5.19 - ts-node: ^10.0.0 - tsconfig-paths: ^3.9.0 - tslib: ^2.3.0 - typescript: ^4.3.5 - languageName: unknown - linkType: soft - "@babel/code-frame@npm:7.12.11": version: 7.12.11 resolution: "@babel/code-frame@npm:7.12.11" @@ -614,6 +556,64 @@ __metadata: languageName: node linkType: hard +"@neonjs/library@workspace:.": + version: 0.0.0-use.local + resolution: "@neonjs/library@workspace:." + dependencies: + "@commitlint/cli": ^12.1.4 + "@commitlint/config-conventional": ^12.1.4 + "@commitlint/cz-commitlint": ^12.1.4 + "@istanbuljs/nyc-config-typescript": ^1.0.1 + "@rollup/plugin-strip": ^2.0.1 + "@saithodev/semantic-release-gitea": ^2.1.0 + "@semantic-release/changelog": ^5.0.1 + "@semantic-release/commit-analyzer": ^8.0.1 + "@semantic-release/git": ^9.0.0 + "@semantic-release/npm": ^7.1.3 + "@semantic-release/release-notes-generator": ^9.0.3 + "@types/chai": ^4.2.19 + "@types/eslint": ^7.2.13 + "@types/mocha": ^8.2.2 + "@types/node": ^15.14.0 + "@types/rollup-plugin-progress": ^1.1.0 + "@types/rollup-plugin-size-snapshot": ^0.10.0 + "@types/semantic-release": ^17 + "@types/sinon": ^10.0.2 + "@types/source-map-support": ^0.5.3 + "@typescript-eslint/eslint-plugin": ^4.28.1 + "@typescript-eslint/parser": ^4.28.1 + "@typescript-eslint/typescript-estree": ^4.28.1 + chai: ^4.3.4 + commitizen: ^4.2.4 + eslint: ^7.29.0 + eslint-formatter-pretty: ^4.1.0 + eslint-plugin-header: ^3.1.1 + husky: ^7.0.0 + inquirer: ^8.1.1 + lint-staged: ^11.0.0 + mocha: ^9.0.1 + nyc: ^15.1.0 + pinst: ^2.0.0 + rimraf: ^3.0.2 + rollup: ^2.52.7 + rollup-plugin-analyzer: ^4.0.0 + rollup-plugin-multi-input: ^1.3.1 + rollup-plugin-progress: ^1.1.2 + rollup-plugin-size-snapshot: ^0.12.0 + rollup-plugin-sizes: ^1.0.4 + rollup-plugin-terser: ^7.0.2 + rollup-plugin-typescript2: ^0.30.0 + rollup-plugin-visualizer: ^5.5.1 + semantic-release: ^17.4.4 + sinon: ^11.1.1 + source-map-support: ^0.5.19 + ts-node: ^10.0.0 + tsconfig-paths: ^3.9.0 + tslib: ^2.3.0 + typescript: ^4.3.5 + languageName: unknown + linkType: soft + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5"