Skip to content

Commit

Permalink
Hotfixes TypeScript package postinstall script (#136)
Browse files Browse the repository at this point in the history
* Correct npm scripts based on TypeScript transpilation
* Update Jenkins credentials to align with package requirements
* Add now explicit build action to Jenkins
  • Loading branch information
rhyslbw authored Apr 7, 2020
1 parent 107ecf6 commit 1036c98
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ pipeline {
stages {
stage('Install') {
steps {
sh 'yarn'
sh 'yarn --cwd ./cli'
sh 'yarn && yarn build'
sh 'yarn --cwd ./cli && yarn --cwd ./cli build'
}
}
stage('Validate Code Style') {
Expand Down Expand Up @@ -58,14 +58,14 @@ pipeline {
environment {
NPM_REGISTRY_AUTH = credentials('npm-registry-auth')
NPM_REGISTRY_URI = credentials('npm-registry-uri')
NPM_REGISTRY_USER = credentials('npm-registry-user')
NPM_REGISTRY_EMAIL = credentials('npm-registry-email')
}
steps {
sh "docker tag inputoutput/cardano-graphql:${env.GIT_COMMIT} inputoutput/cardano-graphql:${env.TAG_NAME}"
sh "docker push inputoutput/cardano-graphql:${env.TAG_NAME}"
sh "npx npm-cli-login -u $NPM_REGISTRY_USER -e $NPM_REGISTRY_AUTH_USR -p $NPM_REGISTRY_AUTH_PSW -r $NPM_REGISTRY_URI"
sh "npx npm-cli-login -u $NPM_REGISTRY_AUTH_USR -e $NPM_REGISTRY_EMAIL -p $NPM_REGISTRY_AUTH_PSW -r $NPM_REGISTRY_URI"
sh "npm publish --cwd ./cli"
sh "npm publish publish --cwd ./generated_packages/TypeScript"
sh "npm publish --cwd ./generated_packages/TypeScript"
}
post {
always {
Expand Down
4 changes: 3 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "tsc -p .",
"dev": "ts-node-dev --no-notify --respawn --transpileOnly src/index.ts",
"lint": "eslint -c ../.eslintrc.json \"src/**/*.ts\"",
"prepare": "yarn build",
"prepack": "yarn build",
"postpack": "shx rm -rf dist",
"test": "jest"
},
"repository": {
Expand Down Expand Up @@ -61,6 +62,7 @@
"eslint-plugin-standard": "^4.0.1",
"eslint-watch": "^6.0.1",
"jest": "^25.1.0",
"shx": "^0.3.2",
"ts-node-dev": "^1.0.0-pre.40",
"typescript": "3.5.3"
},
Expand Down
39 changes: 37 additions & 2 deletions cli/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,11 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"

es6-object-assign@^1.0.3:
version "1.1.0"
resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"
integrity sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=

escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
Expand Down Expand Up @@ -1925,7 +1930,7 @@ glob-parent@^5.0.0, glob-parent@~5.1.0:
dependencies:
is-glob "^4.0.1"

glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
Expand Down Expand Up @@ -2133,6 +2138,11 @@ inquirer@^7.0.0, inquirer@^7.1.0:
strip-ansi "^6.0.0"
through "^2.3.6"

interpret@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296"
integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==

ip-regex@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
Expand Down Expand Up @@ -3649,6 +3659,13 @@ realpath-native@^1.1.0:
dependencies:
util.promisify "^1.0.0"

rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=
dependencies:
resolve "^1.1.6"

redent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
Expand Down Expand Up @@ -3776,7 +3793,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=

resolve@^1.0.0, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2:
resolve@^1.0.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.3.2:
version "1.15.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8"
integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==
Expand Down Expand Up @@ -3934,11 +3951,29 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==

shelljs@^0.8.1:
version "0.8.3"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097"
integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"

shellwords@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==

shx@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.2.tgz#40501ce14eb5e0cbcac7ddbd4b325563aad8c123"
integrity sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==
dependencies:
es6-object-assign "^1.0.3"
minimist "^1.2.0"
shelljs "^0.8.1"

signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
Expand Down
1 change: 0 additions & 1 deletion generated_packages/TypeScript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"scripts": {
"build": "tsc -p .",
"prepack": "yarn build && shx cp ../../src/schema.graphql .",
"preinstall": "yarn build && shx cp ../../src/schema.graphql .",
"postpack": "shx rm schema.graphql && shx rm -rf dist"
},
"keywords": [
Expand Down

0 comments on commit 1036c98

Please sign in to comment.