-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #622 - Include meta data files in packaged application
Signed-off-by: Omkar Phansopkar <[email protected]>
- Loading branch information
Showing
18 changed files
with
225 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The following organizations or individuals have contributed to ScanCode Workbench: | ||
|
||
- @Aayush-hub => Aayush Garg | ||
- @AyanSinhaMahapatra => Ayan Sinha Mahapatra | ||
- @camillem => camillem | ||
- @chinyeungli => Chin Yeung | ||
- @dependabot[bot] => null | ||
- @dotarjun => Arjun | ||
- @jdaguil => Jillian Daguil | ||
- @johnmhoran => John M. Horan | ||
- @kopal960 => Kopal Rustagi | ||
- @lakshay-angrish => null | ||
- @OmkarPh => Omkar Phansopkar | ||
- @pombredanne => Philippe Ombredanne | ||
- @pranav1698 => Pranav Kulshrestha | ||
- @Pushpit07 => Pushpit | ||
- @RituRajSingh878 => Ritu Raj Singh | ||
- @steven-esser => Steven Esser | ||
- @Vishal-raj-1 => Vishal Rajput | ||
- @vsvipul => Vipul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
============ | ||
Contributing | ||
============ | ||
|
||
Contributions are welcome and appreciated! | ||
Every little bit helps, and a credit will always be given. | ||
|
||
.. _issues : https://github.com/nexB/scancode-workbench/issues | ||
__ issues_ | ||
|
||
If you are new to ScanCode Workbench and want to find easy tickets to work on, | ||
check `easy issues <https://github.com/nexB/scancode-workbench/labels/easy>`_ | ||
|
||
When contributing to ScanCode Workbench (such as code, bugs, documentation, etc.) you | ||
agree to the Developer `Certificate of Origin <http://developercertificate.org/>`_ | ||
and the ScanCode license (see the `NOTICE <https://github.com/nexB/scancode-workbench/blob/develop/NOTICE>`_ file). | ||
The same approach is used by Linux Kernel developers and several other projects. | ||
|
||
For commits, it is best to simply add a line like this to your commit message, | ||
with your name and email:: | ||
|
||
Signed-off-by: Jane Doe <[email protected]> | ||
|
||
Please try to write a good commit message, see `good commit message wiki | ||
<https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_ for | ||
details. In particular use the imperative for your commit subject: think that | ||
you are giving an order to the codebase to update itself. | ||
|
||
|
||
Feature requests and feedback | ||
============================= | ||
|
||
To send feedback or ask a question, `file an issue <issues_>`_ | ||
|
||
If you are proposing a feature: | ||
|
||
* Explain how it would work. | ||
* Keep the scope as simple as possible to make it easier to implement. | ||
* Remember that your contributions are welcomed to implement this feature! | ||
|
||
|
||
Chat with other developers | ||
========================== | ||
|
||
For other questions, discussions, and chats, we have: | ||
|
||
- an official Gitter channel at https://gitter.im/aboutcode-org/discuss | ||
Gitter also has an IRC bridge at https://irc.gitter.im/ | ||
This is the main place where we chat and meet. | ||
|
||
- a Gitter channel to discuss Documentation at https://gitter.im/aboutcode-org/gsod-season-of-docs | ||
|
||
Bug reports | ||
=========== | ||
|
||
When `reporting a bug`__ please include: | ||
|
||
* Your operating system name, version, and architecture. | ||
* Your ScanCode Workbench version. | ||
* Any additional details about your local setup that might be helpful to | ||
diagnose this bug. | ||
* Detailed steps to reproduce the bug, such as the scan file you imported, filters you applied, etc. | ||
* The error messages or failure trace if any. | ||
* If helpful, you can add a screenshot as an issue attachment when relevant or | ||
some extra file as a link to a `Gist <https://gist.github.com>`_. | ||
|
||
|
||
Documentation improvements | ||
========================== | ||
|
||
Documentation can come in the form of new documentation pages/sections, tutorials/how-to documents, | ||
any other general upgrades, etc. Even a minor typo fix is welcomed. | ||
|
||
If something is missing in the documentation or if you found some part confusing, | ||
please file an issue with your suggestions for improvement. Your help and contribution make ScanCode Workbench docs better, we love hearing from you! | ||
|
||
The ScanCode Workbench documentation is hosted at `scancode-workbench.readthedocs.io <https://scancode-workbench.readthedocs.io/en/latest/>`_. | ||
|
||
If you want to contribute to Scancode Workbench Documentation, you'll find `this guide here <https://scancode-workbench.readthedocs.io/en/latest/contribute/building.html#building-documentation>`_ helpful. | ||
|
||
|
||
Pull Request Guidelines | ||
----------------------- | ||
|
||
If you need a code review or feedback while you are developing the code just | ||
create a pull request. You can add new commits to your branch as needed. | ||
|
||
For merging, your request would need to: | ||
|
||
1. Include unit tests that are passing (run ``npm test``). | ||
2. Update documentation as needed for new UI screen, functionality, etc. | ||
3. Add a note to ``CHANGELOG.rst`` about the changes. | ||
4. Add your name to ``AUTHORS.rst``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const { version } = require("./package.json"); | ||
|
||
const APP_NAME_WITH_VERSION = `ScanCode-Workbench-${version}`; | ||
|
||
module.exports = { | ||
packagerConfig: { | ||
name: APP_NAME_WITH_VERSION, | ||
icon: "src/assets/app-icon/icon", | ||
}, | ||
plugins: [ | ||
{ | ||
name: "@electron-forge/plugin-webpack", | ||
config: { | ||
mainConfig: "./webpack.main.config.js", | ||
renderer: { | ||
config: "./webpack.renderer.config.js", | ||
entryPoints: [ | ||
{ | ||
html: "./src/index.html", | ||
js: "./src/renderer.ts", | ||
name: "main_window", | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const fs = require("fs"); | ||
const packager = require("electron-packager"); | ||
const { packagerConfig } = require("./forge.config.js"); | ||
|
||
const MetaDataFiles = [ | ||
"apache-2.0.LICENSE", | ||
"AUTHORS.rst", | ||
"CHANGELOG.rst", | ||
"CODE_OF_CONDUCT.rst", | ||
"CONTRIBUTING.rst", | ||
"NOTICE", | ||
"package-lock.json", | ||
"README.md", | ||
"SCANCODE_WORKBENCH_VERSION", | ||
"workbench.ABOUT", | ||
]; | ||
|
||
const ignoreDir = [ | ||
"src", | ||
|
@@ -9,23 +24,32 @@ const ignoreDir = [ | |
".github", | ||
"docs", | ||
"test-db", | ||
".husky", | ||
"coverage", | ||
"tests", | ||
"", // Required as the last element !! | ||
].join("*|"); | ||
|
||
const ignoreFilesOrExtensions = [ | ||
"rst", | ||
"py", | ||
"md", | ||
"txt", | ||
"enc", | ||
".test.ts", | ||
"ABOUT", | ||
".config.js", | ||
".plugins.js", | ||
".rules.js", | ||
".toml", | ||
"workbench.ABOUT", | ||
"LICENSE", | ||
"NOTICE", | ||
".gitignore", | ||
".eslintrc.json", | ||
"package-lock.json", | ||
"packager.js", | ||
"electron-builder.json", | ||
"tsconfig.json", | ||
...MetaDataFiles, | ||
].join("|"); | ||
|
||
packager({ | ||
|
@@ -34,7 +58,7 @@ packager({ | |
overwrite: true, | ||
icon: "src/assets/app-icon/icon", | ||
prune: true, | ||
name: "ScanCode-Workbench", | ||
name: packagerConfig.name, | ||
ignore: new RegExp(`(${ignoreDir}^.*.(${ignoreFilesOrExtensions})$)`), | ||
// osxSign: true, | ||
// osxSign: { | ||
|
@@ -48,4 +72,10 @@ packager({ | |
// appleId: '[email protected]', | ||
// appleIdPassword: 'my-apple-id-password' | ||
// }, | ||
}).then((packagePath) => { | ||
// Copy the metadata files to package directory | ||
MetaDataFiles.forEach((file) => | ||
fs.copyFileSync(file, `${packagePath}/${file}`) | ||
); | ||
console.log(`Packaged app at ${packagePath}`); | ||
}); |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.