From c1c856a858cfcd97c846586b3a80a9097c6e3b98 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Tue, 10 Jan 2023 16:54:01 +0000 Subject: [PATCH] Updates for versioning support --- .github/workflows/build-and-deploy.yml | 5 +++-- site/README.md | 14 ++++++++++++++ site/next.config.js | 4 ++-- site/package-lock.json | 1 - site/yarn.lock | 4 ++-- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index a55201b..ebbb247 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Build 1.0 on: push: @@ -28,4 +28,5 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages - folder: public \ No newline at end of file + folder: public + target-folder: "1.0" \ No newline at end of file diff --git a/site/README.md b/site/README.md index b12f3e3..29c06b1 100644 --- a/site/README.md +++ b/site/README.md @@ -32,3 +32,17 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + +## New schema version + +If a new schema version comes out, this is what you will need to do. + +1. Create a new branch with the schema version as the branch name (for example, 1.1) +1. Open `.github/workflows/build-and-deploy.yml` and change the on: push: branches: to match the new version: +``` +on: + push: + branches: [ 1.1 ] +``` +then at the bottom of the file change the `target-folder` to match the version `target-folder: "1.1"` +1. Open `site/next.config.js` and change `env.schema` to match the version number, add the version number to the `env.listUrl` and append the version number to the `basePath` as well. \ No newline at end of file diff --git a/site/next.config.js b/site/next.config.js index 2862f67..64a57fd 100644 --- a/site/next.config.js +++ b/site/next.config.js @@ -5,12 +5,12 @@ const nextConfig = { name: 'Kasm Technologies', description: 'The official store for Kasm supported applications.', icon: '/img/logo.svg', - listUrl: 'https://registry.kasmweb.com/list.json', + listUrl: 'https://registry.kasmweb.com/1.0/list.json', contactUrl: 'https://kasmweb.com/support', }, reactStrictMode: true, swcMinify: true, - basePath: '/kasm-apps', + basePath: '/kasm-apps/1.0', trailingSlash: true, images: { unoptimized: true, diff --git a/site/package-lock.json b/site/package-lock.json index db6d4ce..9d66076 100644 --- a/site/package-lock.json +++ b/site/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "site", "version": "0.1.0", "dependencies": { "file-saver": "^2.0.5", diff --git a/site/yarn.lock b/site/yarn.lock index 6f838fa..a791b00 100644 --- a/site/yarn.lock +++ b/site/yarn.lock @@ -1179,7 +1179,7 @@ eslint-plugin-react@^7.31.7: array.prototype.flatmap "^1.3.0" doctrine "^2.1.0" estraverse "^5.3.0" - jsx-ast-utils "^2.4.1 || ^3.0.0" + jsx-ast-utils "^2.4.1||^3.0.0" minimatch "^3.1.2" object.entries "^1.1.5" object.fromentries "^2.0.5" @@ -1842,7 +1842,7 @@ loose-envify@^1.1.0, loose-envify@^1.4.0: resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: - js-tokens "^3.0.0 || ^4.0.0" + js-tokens "^3.0.0||^4.0.0" lru-cache@^6.0.0: version "6.0.0"