From d08cf827f50cbfe89054c0e4fd1affcfb9ccff5e Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 21:20:38 -0500 Subject: [PATCH 01/19] chore: bump pkg --- README.md | 8 +++++--- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 28b18ff53..56d4e1d58 100644 --- a/README.md +++ b/README.md @@ -48,15 +48,16 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. +

-* You can use the latest version (0.9.3) by adding it to the head section of your HTML document: +* You can use the latest version (0.9.4) by adding it to the head section of your HTML document: -**v0.9.3** +**v0.9.4** - +

@@ -78,6 +79,7 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. + diff --git a/package-lock.json b/package-lock.json index 8aa5101e1..9efdd7ec5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.3", + "version": "0.9.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1254fa48c..a6c263fb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.3", + "version": "0.9.4", "description": "A friendly machine learning library for the web.", "main": "dist/ml5.min.js", "directories": { From fc56061dac6c86f54f3cfd3ba7142512704f6e7b Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 21:23:11 -0500 Subject: [PATCH 02/19] chore: empty commit From fa9440663fe4f2313f35c6032c09d67400870480 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 21:30:57 -0500 Subject: [PATCH 03/19] chore: kick actions From 70661abf813f29299e64224dc194c86a301e78f8 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 21:35:46 -0500 Subject: [PATCH 04/19] refactor: see if outputs contain anything --- .github/workflows/debugging.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 49442c1f5..88a46721b 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -24,7 +24,12 @@ jobs: id: release_drafter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: echo "testing ${{ steps.release_drafter.data.tag_name }}" + run: echo "name ${{ steps.release_drafter.outputs.name }}" + run: echo "tag_name ${{ steps.release_drafter.outputs.tag_name }}" + run: echo "id ${{ steps.release_drafter.outputs.id }}" + - run: echo "name ${{ steps.release_drafter.outputs.name }}" + - run: echo "tag_name ${{ steps.release_drafter.outputs.tag_name }}" + - run: echo "id ${{ steps.release_drafter.outputs.id }}" # - run: npm ci # - run: echo "passed npm ci" # - run: npm run build From a1b8c315919cdabf235194b22c0e614782e51b90 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 21:37:45 -0500 Subject: [PATCH 05/19] fix: lint --- .github/workflows/debugging.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 88a46721b..15cf9d249 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -24,9 +24,6 @@ jobs: id: release_drafter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: echo "name ${{ steps.release_drafter.outputs.name }}" - run: echo "tag_name ${{ steps.release_drafter.outputs.tag_name }}" - run: echo "id ${{ steps.release_drafter.outputs.id }}" - run: echo "name ${{ steps.release_drafter.outputs.name }}" - run: echo "tag_name ${{ steps.release_drafter.outputs.tag_name }}" - run: echo "id ${{ steps.release_drafter.outputs.id }}" From f4e4d8b756a36f81057062e2ba602bb00382f752 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 21:59:17 -0500 Subject: [PATCH 06/19] refactor: updates package json script --- package.json | 3 ++- scripts/updatePackageVersion.js | 33 ++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index a6c263fb6..fd39a95e7 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "test:single": "./node_modules/karma/bin/karma start karma.conf.js --single-run", "test-travis": "./scripts/test-travis.sh", "serve:docs": "docsify serve docs", + "update:packageVersion": "node ./scripts/updatePackageVersion.js", "update:readme": "node ./scripts/updateReadme.js", "update:docs": "node ./scripts/updateDocVersions.js $oldversion", "publish:npm": "npm run build && npm publish", @@ -132,4 +133,4 @@ "face-api.js": "~0.22.2", "onchange": "^6.1.0" } -} +} \ No newline at end of file diff --git a/scripts/updatePackageVersion.js b/scripts/updatePackageVersion.js index 18ef393f4..bda933f54 100644 --- a/scripts/updatePackageVersion.js +++ b/scripts/updatePackageVersion.js @@ -1,24 +1,31 @@ -const fs = require('fs'); +/** + * USAGE: + * # if using NPM run + * $ npm run update:packageVersion -- v0.9.4 + * + * # if using just node + * $ node updatePackageVersion.js v0.9.4 + */ -const newVersionNumber = process.env.newversion; +const fs = require("fs"); -function checkVersionGiven(){ - if(newVersionNumber === undefined){ - console.log('🔥🔥🔥submit the new version number 🔥🔥🔥'); - process.exit(22); - } +const newVersionNumber = process.argv[2]; + +function checkVersionGiven() { + if (newVersionNumber === undefined) { + console.log("🔥🔥🔥submit the new version number 🔥🔥🔥"); + process.exit(22); + } } -function updatePackageVersion(fpath){ +function updatePackageVersion(fpath) { checkVersionGiven(); let packageJson = fs.readFileSync(fpath); packageJson = JSON.parse(packageJson); - packageJson.version = newVersionNumber; - + packageJson.version = newVersionNumber.replace(/v/g, ""); fs.writeFileSync(fpath, JSON.stringify(packageJson, null, 2)); - } -updatePackageVersion('./package.json') +updatePackageVersion("./package.json"); -// module.exports = updatePackageVersion; \ No newline at end of file +module.exports = updatePackageVersion; From ea004777f8da5b391f1ca6e5fa64b6b9babccf0f Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:03:17 -0500 Subject: [PATCH 07/19] refactor: adds commit step --- .github/workflows/debugging.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 15cf9d249..c47140dfd 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -24,9 +24,12 @@ jobs: id: release_drafter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: echo "name ${{ steps.release_drafter.outputs.name }}" - - run: echo "tag_name ${{ steps.release_drafter.outputs.tag_name }}" - - run: echo "id ${{ steps.release_drafter.outputs.id }}" + - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.tag_name }} + - name: commit changes + run: git add add . + git commit -m "bumps package" + git push origin + - run: echo "bump package and commit complete!" # - run: npm ci # - run: echo "passed npm ci" # - run: npm run build From 9c3e4703a222c5cfddedbd00990251aad7077a52 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:04:30 -0500 Subject: [PATCH 08/19] fix: comand --- .github/workflows/debugging.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index c47140dfd..6c716eae1 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -26,7 +26,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.tag_name }} - name: commit changes - run: git add add . + run: + # add, commit, and push + git add . git commit -m "bumps package" git push origin - run: echo "bump package and commit complete!" From ab961f2f40a7d99dfeb0a68d60afc8e0d4d5d74b Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:05:41 -0500 Subject: [PATCH 09/19] refactor: adds pipe --- .github/workflows/debugging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 6c716eae1..6d0bbf11d 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -26,7 +26,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.tag_name }} - name: commit changes - run: + run: | # add, commit, and push git add . git commit -m "bumps package" From cea01d70e4fb5bf43bfc71ef60d3bb524a6b0c66 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:07:18 -0500 Subject: [PATCH 10/19] refactor: set identity --- .github/workflows/debugging.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 6d0bbf11d..6a8261ed2 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -25,6 +25,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.tag_name }} + - name: setup git config + run: | + # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default + git config user.name "GitHub Actions Bot for ml5" + git config user.email "<>" - name: commit changes run: | # add, commit, and push From 4f29697e0b47823f0ddb7cae99def7b8f1b00901 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:09:23 -0500 Subject: [PATCH 11/19] chore: bump down to 0.9.3 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fd39a95e7..197137e1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.4", + "version": "0.9.3", "description": "A friendly machine learning library for the web.", "main": "dist/ml5.min.js", "directories": { @@ -133,4 +133,4 @@ "face-api.js": "~0.22.2", "onchange": "^6.1.0" } -} \ No newline at end of file +} From 6e1e787691231bba2ce76c5835d624620770041d Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:23:28 -0500 Subject: [PATCH 12/19] chore: testing updates name --- .github/release-drafter.yml | 2 +- .github/workflows/debugging.yml | 22 +++++++++------------- package.json | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a050e7e73..d916542db 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ -name-template: v$RESOLVED_VERSION +name-template: $RESOLVED_VERSION tag-template: v$RESOLVED_VERSION version-resolver: major: diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 6a8261ed2..060797e8f 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -24,20 +24,16 @@ jobs: id: release_drafter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.tag_name }} - - name: setup git config - run: | - # setup the username and email. I tend to use 'GitHub Actions Bot' with no email by default - git config user.name "GitHub Actions Bot for ml5" - git config user.email "<>" - - name: commit changes - run: | - # add, commit, and push - git add . - git commit -m "bumps package" - git push origin - - run: echo "bump package and commit complete!" + # bump the package version + - run: echo "name ${{ steps.release_drafter.outputs.name }}" + # - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }} + # update the readme + # - run: npm run update:readme + # install to update package-lock.json # - run: npm ci # - run: echo "passed npm ci" + # run the build # - run: npm run build # - run: echo "passed build" + # run the build + # - run: npm publish ${{ steps.release_drafter.outputs.tag_name }} diff --git a/package.json b/package.json index 197137e1c..c662e9191 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.3", + "version": "0.9.4", "description": "A friendly machine learning library for the web.", "main": "dist/ml5.min.js", "directories": { From 37a09309a73383ea59eacdd866fe6fec35d1ec4b Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:24:53 -0500 Subject: [PATCH 13/19] empty commit From 97c9fd1069049056358d9ecb0235e0c34fdf13f9 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:28:54 -0500 Subject: [PATCH 14/19] refactor: setup for merge --- .github/workflows/publish.yml | 9 ++++++++- README.md | 8 +++++--- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2af7d350c..23384a592 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,8 +24,15 @@ jobs: with: node-version: "12.x" registry-url: https://registry.npmjs.org/ + - uses: release-drafter/release-drafter@v5 + id: release_drafter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: echo "bumping package to ${{ steps.release_drafter.outputs.name }}" + - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }} + - run: npm run update:readme - run: npm ci - run: npm run build - - run: npm publish + - run: npm publish ${{ steps.release_drafter.outputs.name }} env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/README.md b/README.md index 56d4e1d58..0aaa37a8f 100644 --- a/README.md +++ b/README.md @@ -49,15 +49,16 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. +

-* You can use the latest version (0.9.4) by adding it to the head section of your HTML document: +* You can use the latest version (0.9.3) by adding it to the head section of your HTML document: -**v0.9.4** +**v0.9.3** - +

@@ -80,6 +81,7 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. + diff --git a/package-lock.json b/package-lock.json index 9efdd7ec5..8aa5101e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.4", + "version": "0.9.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c662e9191..197137e1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.4", + "version": "0.9.3", "description": "A friendly machine learning library for the web.", "main": "dist/ml5.min.js", "directories": { From d881c463d344dd4e5f65a0a3a6a327cc0acf29d3 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:36:18 -0500 Subject: [PATCH 15/19] refactor: try commit --- .github/workflows/debugging.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 060797e8f..b01acbc49 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -26,11 +26,17 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # bump the package version - run: echo "name ${{ steps.release_drafter.outputs.name }}" - # - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }} + - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }} # update the readme - # - run: npm run update:readme + - run: npm run update:readme # install to update package-lock.json # - run: npm ci + - name: Commit + run: | + git config --global user.name 'ml5' + git config --global user.email 'admin@ml5js.org' + git commit -am "bumps package, readme, and package-lock" + git push # - run: echo "passed npm ci" # run the build # - run: npm run build From 7988e69d5d39f22f09c822b6593ae5b7d518514a Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:41:12 -0500 Subject: [PATCH 16/19] chore: try push --- .github/workflows/debugging.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index b01acbc49..1c1bd011e 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -36,7 +36,11 @@ jobs: git config --global user.name 'ml5' git config --global user.email 'admin@ml5js.org' git commit -am "bumps package, readme, and package-lock" - git push + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ github.ref }} # - run: echo "passed npm ci" # run the build # - run: npm run build From 02efe2c05b26720f12a0a275a23162a64595aae4 Mon Sep 17 00:00:00 2001 From: ml5 Date: Thu, 3 Feb 2022 03:41:39 +0000 Subject: [PATCH 17/19] bumps package, readme, and package-lock --- README.md | 8 +++++--- package.json | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0aaa37a8f..0b0c4676b 100644 --- a/README.md +++ b/README.md @@ -50,15 +50,16 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. +

-* You can use the latest version (0.9.3) by adding it to the head section of your HTML document: +* You can use the latest version (0.9.4) by adding it to the head section of your HTML document: -**v0.9.3** +**v0.9.4** - +

@@ -82,6 +83,7 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. + diff --git a/package.json b/package.json index 197137e1c..fd39a95e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.3", + "version": "0.9.4", "description": "A friendly machine learning library for the web.", "main": "dist/ml5.min.js", "directories": { @@ -133,4 +133,4 @@ "face-api.js": "~0.22.2", "onchange": "^6.1.0" } -} +} \ No newline at end of file From a4cbc27603b3ada71c086d8fa933d17892687969 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:48:33 -0500 Subject: [PATCH 18/19] refactor: only log v --- .github/workflows/debugging.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/debugging.yml b/.github/workflows/debugging.yml index 1c1bd011e..4cc7ad5c6 100644 --- a/.github/workflows/debugging.yml +++ b/.github/workflows/debugging.yml @@ -26,21 +26,21 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # bump the package version - run: echo "name ${{ steps.release_drafter.outputs.name }}" - - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }} - # update the readme - - run: npm run update:readme - # install to update package-lock.json - # - run: npm ci - - name: Commit - run: | - git config --global user.name 'ml5' - git config --global user.email 'admin@ml5js.org' - git commit -am "bumps package, readme, and package-lock" - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.ref }} + # - run: npm run update:packageVersion ${{ steps.release_drafter.outputs.name }} + # # update the readme + # - run: npm run update:readme + # # install to update package-lock.json + # # - run: npm ci + # - name: Commit + # run: | + # git config --global user.name 'ml5' + # git config --global user.email 'admin@ml5js.org' + # git commit -am "bumps package, readme, and package-lock" + # - name: Push changes + # uses: ad-m/github-push-action@master + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # branch: ${{ github.ref }} # - run: echo "passed npm ci" # run the build # - run: npm run build From d603f55314eb30eebb0a3e39321f9e38bf3365e4 Mon Sep 17 00:00:00 2001 From: joeyklee Date: Wed, 2 Feb 2022 22:49:18 -0500 Subject: [PATCH 19/19] refactor: bump down ot 0.9.3 --- README.md | 8 +++++--- package.json | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0b0c4676b..d01e67b17 100644 --- a/README.md +++ b/README.md @@ -51,15 +51,16 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. +

-* You can use the latest version (0.9.4) by adding it to the head section of your HTML document: +* You can use the latest version (0.9.3) by adding it to the head section of your HTML document: -**v0.9.4** +**v0.9.3** - +

@@ -84,6 +85,7 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github. + diff --git a/package.json b/package.json index fd39a95e7..197137e1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ml5", - "version": "0.9.4", + "version": "0.9.3", "description": "A friendly machine learning library for the web.", "main": "dist/ml5.min.js", "directories": { @@ -133,4 +133,4 @@ "face-api.js": "~0.22.2", "onchange": "^6.1.0" } -} \ No newline at end of file +}