diff --git a/README.md b/README.md index 2d8b696..3653dfb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ The project contains the next structure ``` ├── README.md -├── create-release.sh ├── docker-compose.yaml ├── nx.json ├── package-lock.json @@ -38,7 +37,6 @@ The project contains the next structure At the root level, the repository contains common config files or dependencies like NX - README.MD: Project basic documentation -- create-release.sh: Script to generate a tag/release for each project - docker-compose.yaml: Docker configuration to run the projects locally. - nx.json: Configuration related to NX library - package.json and package-lock.json: NodeJS dependencies @@ -104,16 +102,15 @@ For example: ./create-release pipe-vms-ingestion 1.0.0 ``` -This script will open an editor, and you can add release notes to there. Also, you can add release -notes in the Github page that will be launched after close this editor. - -You must remove the `v` prefix that NX adds by default (it is an issue that their team needs to fix) and -create a new tag + create new release. +This script will open an editor, and you can add release notes to there. Once the tag is created +you have to create the release in https://github.com/GlobalFishingWatch/pipe-vms/releases/new selecting +the tag that was just created. We recommend using the `Generate releease notes` button in the `New Release` +page to generate the release notes. One trigger will be launching via CloudBuild and generate a docker image like this: ``` -gcr.io/world-fishing-827/github.com/globalfishingwatch/pipe-vms:pipe-vms-ingestion-1.0.0 +gcr.io/world-fishing-827/github.com/globalfishingwatch/pipe-vms-ingestion@1.0.0 ``` --- @@ -121,7 +118,7 @@ gcr.io/world-fishing-827/github.com/globalfishingwatch/pipe-vms:pipe-vms-ingesti ### Add a new project ``` -yarn nx generate @nxlv/python:poetry-project [project_name] \ +npx nx generate @nxlv/python:poetry-project [project_name] \ --projectType application \ --description='Project description' \ --packageName=[project-name] \ @@ -131,7 +128,7 @@ yarn nx generate @nxlv/python:poetry-project [project_name] \ Example: ``` -yarn nx generate @nxlv/python:poetry-project vms_ingestion \ +npx nx generate @nxlv/python:poetry-project vms_ingestion \ --projectType application \ --description='VMS Ingestion processes' \ --packageName=pipe-vms-ingestion \ @@ -143,7 +140,7 @@ yarn nx generate @nxlv/python:poetry-project vms_ingestion \ ### Add a new library ``` -yarn nx generate @nxlv/python:poetry-project [library_name] \ +npx nx generate @nxlv/python:poetry-project [library_name] \ --projectType library \ --description='Library description' \ --packageName=[library-name] \ @@ -154,7 +151,7 @@ yarn nx generate @nxlv/python:poetry-project [library_name] \ Example: ``` -yarn nx generate @nxlv/python:poetry-project gfw-logger \ +npx nx generate @nxlv/python:poetry-project gfw-logger \ --projectType library \ --description='Library to reuse the GFW Logger' \ --packageName=gfw-logger \ @@ -170,14 +167,14 @@ In order to use a shared library in the projects, you need to link the library w the project. ``` -yarn nx run [project-name]:add --name [lib-name] --local +npx nx run [project-name]:add --name [lib-name] --local ``` Example: ``` -yarn nx run publication-vms-ingestion:add --name libs-logger --local +npx nx run publication-vms-ingestion:add --name libs-logger --local ``` diff --git a/create-release.sh b/create-release.sh index e4ccdab..42b20e6 100755 --- a/create-release.sh +++ b/create-release.sh @@ -45,4 +45,8 @@ fi echo "Creating release of $APP for version $VERSION" echo $VERSION $APP -npx nx release changelog --create-release=github -i ${VERSION} -p $APP --tagVersionPrefix=${APP}- --file false --from main +npx nx release changelog \ + -i "all" \ + -p $APP \ + --from develop \ + ${VERSION} diff --git a/nx.json b/nx.json index 09f2aae..af8aa77 100644 --- a/nx.json +++ b/nx.json @@ -5,17 +5,30 @@ "default": { "runner": "nx-cloud", "options": { - "cacheableOperations": [ - "build", - "lint", - "test", - "e2e" - ], + "cacheableOperations": ["build", "lint", "test", "e2e"], "accessToken": "" } } }, - "plugins": [ - "@nxlv/python" - ] + "plugins": ["@nxlv/python"], + "release": { + "projects": ["*", "!ignore-me"], + "projectsRelationship": "independent", + "changelog": { + "projectChangelogs": { + "renderOptions": { + "authors": true, + "commitReferences": true, + "versionTitleDate": true + } + }, + "workspaceChangelog": { + "renderOptions": { + "authors": true, + "commitReferences": true, + "versionTitleDate": true + } + } + } + } } diff --git a/package-lock.json b/package-lock.json index 7292ce5..3b62397 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,12 +40,12 @@ } }, "node_modules/@nrwl/devkit": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.2.2.tgz", - "integrity": "sha512-NWB3OAm6/oHaF2h7isUXpK9J2XF097mfaiENHj1GzH9JwjB2YoFaD7v033er6+Hb6FEZtOPZpVH1kEQjVaYJLA==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.3.2.tgz", + "integrity": "sha512-n3tFalVPUk1HAJ2VYNnF34yzB9j2+6swFUi4Y92PxD1vN7vrIXnNeaTx2qcee7JDjBpiJ7Zn0KLg2jwiH6hNwA==", "dev": true, "dependencies": { - "@nx/devkit": "19.2.2" + "@nx/devkit": "19.3.2" } }, "node_modules/@nrwl/nx-cloud": { @@ -58,12 +58,12 @@ } }, "node_modules/@nrwl/tao": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.2.2.tgz", - "integrity": "sha512-G/m3EGXf3m9rM2sQQGpRPD40gfaWR6jFVCsZW66/6FXDo1dMUH5/U5JOBnD6vBdug8txKA1ceWHM74NkAB1QEg==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.3.2.tgz", + "integrity": "sha512-I1gW7woqwU6rdlgwj6XXAKcreJ5ptRKI2WpLdZErkrPmaRG/jMZx/yjZrG4PWdIEuZ4ZmYnRsoXbKN6ilCknQw==", "dev": true, "dependencies": { - "nx": "19.2.2", + "nx": "19.3.2", "tslib": "^2.3.0" }, "bin": { @@ -71,12 +71,12 @@ } }, "node_modules/@nx/devkit": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.2.2.tgz", - "integrity": "sha512-6y+th5m1qVc+B0lXmKb3WRcfwNYD2B/bqGn1HiKLu8g6DDVJFn0mT+a872e4OtvgHyubZQm3HnPfjXobChpRuw==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.3.2.tgz", + "integrity": "sha512-uD3jaJ1Jvf7B6jqH2t2GH0L6REwcCGBLXq1qs1HRQF5SZrEtuUeusn8wvCKP7dftPK3byLHAG0xHRW4+IUAz/g==", "dev": true, "dependencies": { - "@nrwl/devkit": "19.2.2", + "@nrwl/devkit": "19.3.2", "ejs": "^3.1.7", "enquirer": "~2.3.6", "ignore": "^5.0.4", @@ -91,9 +91,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.2.2.tgz", - "integrity": "sha512-AgvsZ0iDA0rklH0TqOIiTrbJysn7WfFFzhLYd1JnxS2Z3GAFPRoE6TxRSSqpTBmFqskrZhZyrjHllOoBD5odFQ==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.3.2.tgz", + "integrity": "sha512-MTqPTR1FwfVfIkHKUw95dFlPBN6mbqfJ+KzLHvUSPcqLKelhi82tsisjMoB5sNK0YWcNNVqYW72ojCnHVB0TUg==", "cpu": [ "arm64" ], @@ -107,9 +107,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.2.2.tgz", - "integrity": "sha512-YPd9Kmn5/YPYolBVYoficQmp8LFTe/PAI3dQ3NebOGFYw49PFmV0cdB8+4m0q70WCBMwyqo1x6a6MO9CvENkTg==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.3.2.tgz", + "integrity": "sha512-C8s9X5AlVgl3V5PycLdX+75lpAWq0qQs6QUEAnyxrLM9l+/HRecgoW6uZ7tX6Fnd8WGfMIwyahBw4LyZgk6zTw==", "cpu": [ "x64" ], @@ -123,9 +123,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.2.2.tgz", - "integrity": "sha512-43hMzFmYyi0aEiGa/VNXChzotL6nFG9hLSZhtpXAO6qyibSqKwlU5PjNyly/7y5gUGl7YfmdpwWwlOIYPSQoVw==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.3.2.tgz", + "integrity": "sha512-XeEpEU0iqJ/5cAPMmjqJ0Sdz89ZtDRj4NdksioyhAHri94X5/3lm3lDs4tB3nObT7p3QL7r/HP1itq5DHYmMSQ==", "cpu": [ "x64" ], @@ -139,9 +139,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.2.2.tgz", - "integrity": "sha512-locP8QQWI4NFb7kVe8Fflkpdnf9kw5o/WMROILJLFWlTy59K+NBQkpxRIhoUghJ6yckDxk1Kf2kmvV+xuX4f8Q==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.3.2.tgz", + "integrity": "sha512-r4Wl0P94QRBUyiexUcfwKxqFXp48avMG3L0no/ZuNWGODbw1w8ppA4vhnkXtXbIaMdaTGx9eIYO7kFJ2SwMCng==", "cpu": [ "arm" ], @@ -155,9 +155,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.2.2.tgz", - "integrity": "sha512-uQUZs+56yplEjokgCC3Pv/nUr4v+/bCurc1v/juUH4byqCdvi+Cny7jqws49UELS+QkcTkWGBtajvf8U3JZEbQ==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.3.2.tgz", + "integrity": "sha512-oaTC4iS1fXnc61ZgSxwCQ2GGIqY64G22udRqNsX9TOtgrT7UA/mjE3Si01r+0xODimOiB525ueyxdIh1MAu6Vg==", "cpu": [ "arm64" ], @@ -171,9 +171,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.2.2.tgz", - "integrity": "sha512-rU6l18ubh0Chv7lkxshgm6o4IKduB+jztUBRR4SuOuTOLJ6okm51AqzdY+vy7esicEL3HnHWSJP/U5PwoAaNsA==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.3.2.tgz", + "integrity": "sha512-yyO9bTM7FW7HTYsSQlL4lgbAexUBpzfhdK+RkgsCiW+U/5bi+jFRxo/SbqGUL+IVliFavWyRXahMqOOM6nBq/w==", "cpu": [ "arm64" ], @@ -187,9 +187,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.2.2.tgz", - "integrity": "sha512-rvGP3p0qmzHJu8cUcYnRDyJ1BkVExgmsWmtzyQrHl48+hvNrq805NrP3gTreOxqymRlBEXg7c22fRECI1CV1lA==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.3.2.tgz", + "integrity": "sha512-DC+llVdL4toLjQkDGBgzoCe26FWIOT+SzRdVcKePoNliZ4jDhkOh3+p75NEIOEcDUgoE9M2iCWEBUjkV978ogw==", "cpu": [ "x64" ], @@ -203,9 +203,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.2.2.tgz", - "integrity": "sha512-86pfT+z6SWKlJUoRy7MOMjRhrCPgSnAxbcH7jYCkqhokbCIDIv2IFWqMf0zdUqa8HqjRo13X6Jd6PhNYzWwJzw==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.3.2.tgz", + "integrity": "sha512-Wun4v+kuuqv20tJiCENkHGisDqfx029bFufqxx2IOe9TvD6vK4rMMkFVPUoK3FP8EBdaMW4nrR0ZucTFnStl6w==", "cpu": [ "x64" ], @@ -219,9 +219,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.2.2.tgz", - "integrity": "sha512-kJ3G0+nyAgBr5RTkNceC9zl2pekFEu0ec6ceLJ0tfcTwil76Ce3Xnlr0CFFNsre4T1v2RfFIDJL3EaRUXYep0w==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.3.2.tgz", + "integrity": "sha512-bNVf6eu5rWFjHvn0rKHeZYlHUcs3naXvvbduW1g0DPkHG6mt8FYffQmyboN+CSeBd/uWDPNyTUekVWwU7PjtLA==", "cpu": [ "arm64" ], @@ -235,9 +235,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.2.2.tgz", - "integrity": "sha512-9KKGYFgWfc4jHzHjnIp+DJt750NyG1kA4Q+DWf/UcFA5917UWuAw9rribFPRsqYkcwbu++Uajw5bI5yMLP7ThA==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.3.2.tgz", + "integrity": "sha512-8DD5BPa5YrxTOKL3HTAgEd+IXNqRtJfwvbrn2MbOMNMyoMG9Zi5yhFvTH/HTT9Tz6VUHvXP16QWYA3R7eFi7Gg==", "cpu": [ "x64" ], @@ -2063,13 +2063,13 @@ } }, "node_modules/nx": { - "version": "19.2.2", - "resolved": "https://registry.npmjs.org/nx/-/nx-19.2.2.tgz", - "integrity": "sha512-Tg3REVykwKmVBCsroeCE/KhHAJx3e/m0FgNZWXJhn3EEh01qhdsVfWpM/ecawin73or7YcvB/99S8vVPU1nczg==", + "version": "19.3.2", + "resolved": "https://registry.npmjs.org/nx/-/nx-19.3.2.tgz", + "integrity": "sha512-eKWs+ahkTKnq9EeWJCE4u8JLeq1cOHnq5DKoiisy2nwUg4KGy1odReegxUMLeEgNBcMI40EUtEJFiTMJSXZQeg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/tao": "19.2.2", + "@nrwl/tao": "19.3.2", "@yarnpkg/lockfile": "^1.1.0", "@yarnpkg/parsers": "3.0.0-rc.46", "@zkochan/js-yaml": "0.0.7", @@ -2078,8 +2078,8 @@ "cli-cursor": "3.1.0", "cli-spinners": "2.6.1", "cliui": "^8.0.1", - "dotenv": "~16.3.1", - "dotenv-expand": "~10.0.0", + "dotenv": "~16.4.5", + "dotenv-expand": "~11.0.6", "enquirer": "~2.3.6", "figures": "3.2.0", "flat": "^5.0.2", @@ -2109,16 +2109,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "19.2.2", - "@nx/nx-darwin-x64": "19.2.2", - "@nx/nx-freebsd-x64": "19.2.2", - "@nx/nx-linux-arm-gnueabihf": "19.2.2", - "@nx/nx-linux-arm64-gnu": "19.2.2", - "@nx/nx-linux-arm64-musl": "19.2.2", - "@nx/nx-linux-x64-gnu": "19.2.2", - "@nx/nx-linux-x64-musl": "19.2.2", - "@nx/nx-win32-arm64-msvc": "19.2.2", - "@nx/nx-win32-x64-msvc": "19.2.2" + "@nx/nx-darwin-arm64": "19.3.2", + "@nx/nx-darwin-x64": "19.3.2", + "@nx/nx-freebsd-x64": "19.3.2", + "@nx/nx-linux-arm-gnueabihf": "19.3.2", + "@nx/nx-linux-arm64-gnu": "19.3.2", + "@nx/nx-linux-arm64-musl": "19.3.2", + "@nx/nx-linux-x64-gnu": "19.3.2", + "@nx/nx-linux-x64-musl": "19.3.2", + "@nx/nx-win32-arm64-msvc": "19.3.2", + "@nx/nx-win32-x64-msvc": "19.3.2" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -2163,6 +2163,33 @@ "node": ">=10" } }, + "node_modules/nx/node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/nx/node_modules/dotenv-expand": { + "version": "11.0.6", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.6.tgz", + "integrity": "sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==", + "dev": true, + "dependencies": { + "dotenv": "^16.4.4" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",