From 83ad209f0b4c48defe9c5b461d677abde35820f5 Mon Sep 17 00:00:00 2001 From: Alexandr Promakh Date: Wed, 5 Jun 2019 22:55:25 +0500 Subject: [PATCH] Readme and License --- .electron-vue/build.js | 2 +- LICENSE.md | 19 +++++++++++ README.md | 76 +++++++++++++++++++++++++++++++++++------- 3 files changed, 84 insertions(+), 13 deletions(-) create mode 100644 LICENSE.md diff --git a/.electron-vue/build.js b/.electron-vue/build.js index 896ccce..f6e5463 100644 --- a/.electron-vue/build.js +++ b/.electron-vue/build.js @@ -102,7 +102,7 @@ async function build() { async function setBuildVersionAndNumber() { const { version } = packageJson - const buildNumber = dateFormat(new Date(), 'yyyyddmm-HHMMss', true) + const buildNumber = dateFormat(new Date(), 'yyyymmdd-HHMMss', true) await mkdirp(path.resolve(__dirname, '../build')) await Promise.all([ diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..a55afd5 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,19 @@ +Copyright (c) 2019 Pixel Point + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 1274b0c..33979ad 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,82 @@ # Kube Forwarder -> A tool for managing port forwarding configs for kubernetes clusters +A tool for managing port forwarding configs for kubernetes clusters. +Built with [Electron](https://electronjs.org) -#### Build Setup +## Getting Started -``` bash +### Prerequisites + +* Node 10.8+ +* MacOS (if you want to build `.dmg` target) +* Docker (if you want to run tests) + +### Installing + +``` # install dependencies npm install # serve with hot reload at localhost:9080 npm run dev -# build electron application for production +# serve WEB version with hot reload at localhost:9081 +npm run web +``` + +### Build + +Build an application for production +``` +# Build a target for current OS npm run build -# run unit & end-to-end tests -npm test +# Build a target for Windows +npm run build -- -- --win +# Build a target for Linux +npm run build -- -- --linux -# lint all JS/Vue component files in `src/` -npm run lint +# You can mix targets +npm run build -- -- --win --linux +# You can build static and target separately +npm run build:dist +npm run build:target -- --win ``` -### Release guide +A built version will be appear in `build` directory. + +## Running the tests + +We are using [Cypress](https://www.cypress.io) to run integration tests. +There are visual regression tests. It's important to run them inside docker +container to get same screenshots as in Drone CI. + +``` +npm run test:cypress +``` + +Or you can run it manually on a local machine. +``` +npm run web + +# In a separate terminal tab +npm run test:cypress:onhost + +# Or you can open Cypress GUI +npm run test:cypress:open +``` + +## Release guide 1) Update the version in `package.json`. -2) Push to `release` branch. -3) Run `npm run release` on a Mac computer to build `.dmg` target. -4) Go to Releases tab in the repository, test and release the created draft. +2) Push to `release` branch. [Drone(pixel-point/kube-forwarder)](https://drone.pixelpoint.io/pixel-point/kube-forwarder/) +will build packages for Windows and Linux and upload them to [releases](https://github.com/pixel-point/kube-forwarder/releases) +3) Run `npm run release` on a Mac computer to build `.dmg` target. +It will be automatically pushed to releases at Github. +4) Go to [Releases](https://github.com/pixel-point/kube-forwarder/releases) in the repository. +Make sure that the created draft is OK and release it (Edit -> Release). Notes: 1) `.dmg` target is added to release by your mac computer. @@ -36,6 +84,10 @@ Notes: 2) A release tag (for example: `v1.0.3`) will be added automatically by Github when you release your draft. +## License + +This project is licensed under the MIT License - see the LICENSE.md file for details + --- This project was generated with [electron-vue](https://github.com/SimulatedGREG/electron-vue)@[8fae476](https://github.com/SimulatedGREG/electron-vue/tree/8fae4763e9d225d3691b627e83b9e09b56f6c935) using [vue-cli](https://github.com/vuejs/vue-cli). Documentation about the original structure can be found [here](https://simulatedgreg.gitbooks.io/electron-vue/content/index.html).