Skip to content

Commit 542efce

Browse files
authored
Merge pull request #623 from nexB/fix/packaging-structure
Include metadata in release archive, update package names, reduce package size
2 parents 99a1525 + c1edf74 commit 542efce

29 files changed

+1511
-446
lines changed

.github/workflows/Release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: softprops/action-gh-release@v1
2727
with:
2828
tag_name: ${{steps.tag.outputs.tag}}
29-
name: Release ${{steps.tag.outputs.tag}}
29+
name: ${{steps.tag.outputs.tag}}
3030
body_path: ./Release.md
3131
draft: false
3232
prerelease: false
@@ -50,12 +50,16 @@ jobs:
5050
node-version: 16.13.0
5151
- name: Install dependencies
5252
run: npm install
53-
- name: Build Workbench & create archive for ${{ matrix.os }}
53+
- name: Create release assets directory
54+
run: mkdir -p dist
55+
- name: Build Workbench & create release archive for ${{ matrix.os }}
5456
run: npm run publish
55-
- name: Verify Generated archive in dist/
57+
- name: Create source code archive (including node_modules)
58+
run: npm run srcarchive
59+
- name: Verify Generated archives in dist/
5660
run: ls ./dist
5761
- name: Upload release assets
5862
uses: softprops/action-gh-release@v1
5963
with:
6064
tag_name: ${{ github.ref_name }}
61-
files: dist/*
65+
files: dist/*

AUTHORS.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The following organizations or individuals have contributed to ScanCode Workbench:
2+
3+
- @Aayush-hub => Aayush Garg
4+
- @AyanSinhaMahapatra => Ayan Sinha Mahapatra
5+
- @camillem => camillem
6+
- @chinyeungli => Chin Yeung
7+
- @dependabot[bot] => null
8+
- @dotarjun => Arjun
9+
- @jdaguil => Jillian Daguil
10+
- @johnmhoran => John M. Horan
11+
- @kopal960 => Kopal Rustagi
12+
- @lakshay-angrish => null
13+
- @OmkarPh => Omkar Phansopkar
14+
- @pombredanne => Philippe Ombredanne
15+
- @pranav1698 => Pranav Kulshrestha
16+
- @Pushpit07 => Pushpit
17+
- @RituRajSingh878 => Ritu Raj Singh
18+
- @steven-esser => Steven Esser
19+
- @Vishal-raj-1 => Vishal Rajput
20+
- @vsvipul => Vipul

CHANGELOG.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file.
55
The format is based on `Keep a
66
Changelog <https://keepachangelog.com/en/1.0.0/>`__
77

8+
[Unreleased (v4.0.1)]
9+
--------------------------
10+
11+
**This ScanCode-Workbench release contains schema changes: scans will have to be re-imported**
12+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
14+
--------------------
15+
New Features
16+
~~~~~~~~~~~~
17+
18+
- Support for To-do items by @OmkarPh in #593
19+
- Track & filter reviewed licenses by @OmkarPh in #571
20+
21+
Bug Fixes
22+
~~~~~~~~~
23+
24+
- Fixed Irregular auto-scroll to target path by @OmkarPh in #610
25+
- Fixed all vulnerabilities & updated packages by @OmkarPh in #611
26+
- Restore old app name by @dotarjun in #615
27+
- Fixed compund SPDX expression resolution in detection & clue matches by @OmkarPh in #619
28+
- Reduce release build size by removing redundant `node_modules` dependencies by @OmkarPh in #623
29+
30+
831
[v4.0.0] - 2023-10-26
932
--------------------------
1033

@@ -52,7 +75,6 @@ New Features
5275
- Working indicator for queries
5376
- Diff modal for Matched text & Rule text in Matches table
5477

55-
5678
Bug Fixes
5779
~~~~~~~~~
5880

CONTRIBUTING.rst

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
============
2+
Contributing
3+
============
4+
5+
Contributions are welcome and appreciated!
6+
Every little bit helps, and a credit will always be given.
7+
8+
.. _issues : https://github.com/nexB/scancode-workbench/issues
9+
__ issues_
10+
11+
If you are new to ScanCode Workbench and want to find easy tickets to work on,
12+
check `easy issues <https://github.com/nexB/scancode-workbench/labels/easy>`_
13+
14+
When contributing to ScanCode Workbench (such as code, bugs, documentation, etc.) you
15+
agree to the Developer `Certificate of Origin <http://developercertificate.org/>`_
16+
and the ScanCode license (see the `NOTICE <https://github.com/nexB/scancode-workbench/blob/develop/NOTICE>`_ file).
17+
The same approach is used by Linux Kernel developers and several other projects.
18+
19+
For commits, it is best to simply add a line like this to your commit message,
20+
with your name and email::
21+
22+
Signed-off-by: Jane Doe <[email protected]>
23+
24+
Please try to write a good commit message, see `good commit message wiki
25+
<https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_ for
26+
details. In particular use the imperative for your commit subject: think that
27+
you are giving an order to the codebase to update itself.
28+
29+
30+
Feature requests and feedback
31+
=============================
32+
33+
To send feedback or ask a question, `file an issue <issues_>`_
34+
35+
If you are proposing a feature:
36+
37+
* Explain how it would work.
38+
* Keep the scope as simple as possible to make it easier to implement.
39+
* Remember that your contributions are welcomed to implement this feature!
40+
41+
42+
Chat with other developers
43+
==========================
44+
45+
For other questions, discussions, and chats, we have official Matrix rooms:
46+
47+
- `discuss room <https://matrix.to/#/#aboutcode-org_discuss:gitter.im>`_ (for all projects)
48+
- `scancode-workbench room <https://matrix.to/#/#aboutcode-org_scancode-workbench:gitter.im>`_
49+
50+
51+
Bug reports
52+
===========
53+
54+
When `reporting a bug`__ please include:
55+
56+
* Your operating system name, version, and architecture.
57+
* Your ScanCode Workbench version.
58+
* Any additional details about your local setup that might be helpful to
59+
diagnose this bug.
60+
* Detailed steps to reproduce the bug, such as the scan file you imported, filters you applied, etc.
61+
* The error messages or failure trace if any.
62+
* If helpful, you can add a screenshot as an issue attachment when relevant or
63+
some extra file as a link to a `Gist <https://gist.github.com>`_.
64+
65+
66+
Documentation improvements
67+
==========================
68+
69+
Documentation can come in the form of new documentation pages/sections, tutorials/how-to documents,
70+
any other general upgrades, etc. Even a minor typo fix is welcomed.
71+
72+
If something is missing in the documentation or if you found some part confusing,
73+
please file an issue with your suggestions for improvement. Your help and contribution make ScanCode Workbench docs better, we love hearing from you!
74+
75+
The ScanCode Workbench documentation is hosted at `scancode-workbench.readthedocs.io <https://scancode-workbench.readthedocs.io/en/latest/>`_.
76+
77+
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.
78+
79+
80+
Pull Request Guidelines
81+
-----------------------
82+
83+
If you need a code review or feedback while you are developing the code just
84+
create a pull request. You can add new commits to your branch as needed.
85+
86+
For merging, your request would need to:
87+
88+
1. Include unit tests that are passing (run ``npm test``).
89+
2. Update documentation as needed for new UI screen, functionality, etc.
90+
3. Add a note to ``CHANGELOG.rst`` about the changes.
91+
4. Add your name to ``AUTHORS.rst``.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ Note: Due to usage of native modules, a build must be done on target platform on
7272
$ npm run publish
7373
```
7474

75-
After building is done, you can find `ScanCode-Workbench` under
76-
`dist/ScanCode-Workbench-<os>-x64-<version>`. Archives (tar.gz and .zip) are
77-
also built.
75+
You can find the executible `ScanCode-Workbench-<version>` inside `out/ScanCode-Workbench-<version>-<os>-<arch>` and distributable archive (.tar.gz or .zip) in `dist/`
7876

7977
## Testing
8078

Release.md

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,25 @@
11
## Major changes
22

3-
- Ported to React + Typescript variant !!
4-
Under GSoC by @OmkarPh
5-
- Support for scancode-toolkit v32.x output format v3.0.0
6-
- Updated Tableview library & columns
7-
- New sections: License Detections explorer, Packages explorer, ScanInfo, About
8-
- Support for multiple windows
9-
- Maintain history of imports
10-
- Updated dependencies
11-
- Created UI to support top level packages-deps obtained in latest scans
12-
- Support for Drag & drop JSON/SQLite files
13-
- Github actions to create automated releases
14-
Exception: macos arm64 is not yet support by Github actions yet, needs manual build & upload
15-
- Retain column order & states https://github.com/nexB/scancode-workbench/pull/568
16-
- License clues section in Licenses explorer https://github.com/nexB/scancode-workbench/pull/570
17-
- Go to specific file from licenses & packages explorer https://github.com/nexB/scancode-workbench/pull/572
18-
- Diff modal for Matched text & Rule text in Matches table https://github.com/nexB/scancode-workbench/pull/577
19-
- Working indicator for queries https://github.com/nexB/scancode-workbench/pull/583
20-
- Dashboard updates https://github.com/nexB/scancode-workbench/pull/585
21-
- Close file & cleanup https://github.com/nexB/scancode-workbench/pull/600
22-
- Unit tests https://github.com/nexB/scancode-workbench/pull/591
23-
- Dependency Info dashboard updates https://github.com/nexB/scancode-workbench/pull/594
24-
- Updated documentation https://github.com/nexB/scancode-workbench/pull/602
3+
- Support for To-do items by @OmkarPh in #593
4+
- Track & filter reviewed licenses by @OmkarPh in #571
255

266
## ScanCode Toolkit Compatibility
277

288
This v4.0.0 of ScanCode Workbench is compatible with scans from any [ScanCode Toolkit](https://github.com/nexB/scancode-toolkit/) releases at or after [`v32.0.0`](https://github.com/nexB/scancode-toolkit/releases/tag/v32.0.0rc4) and also from the latest develop, but using the latest `v32.x` stable releases is recommended: [latest SCTK release](https://github.com/nexB/scancode-toolkit/releases/latest).
299

3010
## Bug fixes
3111

32-
- Prevent crashes on unsupported scans
33-
- Provision for header-less scans (Test scans)
34-
- Table column fixes
35-
- Fixed UI anomalies
36-
- Invalid path query fix (Data for files with similar prefix were colliding)
37-
- window title update & occasional sqlite error for packages https://github.com/nexB/scancode-workbench/pull/560
38-
- license detection parser issues, trimmed filter options, hide empty 'other dependencies' https://github.com/nexB/scancode-workbench/pull/569
39-
- Refined UX including consistent scrollbars, tooltips, Search in licenses, filters for dependencies https://github.com/nexB/scancode-workbench/pull/587
40-
- Updated piechart tooltip https://github.com/nexB/scancode-workbench/pull/582
41-
- Automatic height for tables https://github.com/nexB/scancode-workbench/pull/606
42-
- Fixed Empty directory being shown with file icon https://github.com/nexB/scancode-workbench/pull/604
43-
- Fix irregular scroll behavior for files in deeply nested FileTree https://github.com/nexB/scancode-workbench/pull/599
12+
- Fixed Irregular auto-scroll to target path by @OmkarPh in #610
13+
- Fixed all vulnerabilities & updated packages by @OmkarPh in #611
14+
- Restore old app name by @dotarjun in #615
15+
- Fixed compund SPDX expression resolution in detection & clue matches by @OmkarPh in #619
16+
- Reduce release build size by removing redundant `node_modules` dependencies by @OmkarPh in #623
17+
18+
## Framework
19+
20+
- Electorn [v28.1.0](https://releases.electronjs.org/release/v28.1.0)
21+
- Chromium [v120.0.6099.109](https://source.chromium.org/chromium/chromium/src/+/refs/tags/120.0.6099.109:)
22+
23+
# New Contributors
24+
25+
- @dotarjun made his first contribution in #615

SCANCODE_WORKBENCH_VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0.1

archive_builder.py

Lines changed: 0 additions & 76 deletions
This file was deleted.

attribution.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ <h2>About ScanCode Workbench 4.0.0:</h2>
9797

9898
<!-- <h2>ScanCode Workbench contains the following software components:</h2> -->
9999
<!-- <h3><a id="End">End</a></h3> -->
100-
101-
<h2>ScanCode Workbench contains the following image assets:</h2>
102-
Import file illustration -
103-
<a href="https://storyset.com/work">Work illustrations by Storyset</a>
104-
105100
<br />
106101
<br />
107102
</body>

buildSourceArchive.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
2+
const os = require("os");
3+
const fs = require("fs");
4+
const path = require("path");
5+
const archiver = require("archiver");
6+
const version = require("./package.json").version;
7+
8+
const archiveDirectory = "dist";
9+
const platform = os.platform();
10+
const arch = os.arch();
11+
12+
// Determine the packaging format based on the OS
13+
const isWindows = platform === "win32";
14+
const archiveFormat = isWindows ? "zip" : "tar";
15+
const archiveExtension = isWindows ? "zip" : "tar.gz";
16+
17+
console.log("Building source archive ...");
18+
19+
// Ensure that the archive destination directory exists
20+
if (!fs.existsSync(archiveDirectory)) {
21+
fs.mkdirSync(archiveDirectory);
22+
}
23+
24+
// Create the archive file with the same name as the package directory
25+
const archiveFileName = `ScanCode-Workbench-${version}-${platform}-${arch}-src.${archiveExtension}`;
26+
const archiveFilePath = path.join(archiveDirectory, archiveFileName);
27+
const output = fs.createWriteStream(archiveFilePath);
28+
const archive = archiver(archiveFormat, { gzip: true });
29+
30+
output.on("close", () => {
31+
console.log(`Created source archive at ${archiveFilePath}`);
32+
});
33+
34+
archive.pipe(output);
35+
36+
archive.glob("**/*", {
37+
dot: true,
38+
cwd: process.cwd(),
39+
ignore: ["dist/**", "out/**", ".git/**"],
40+
});
41+
42+
archive.finalize();

0 commit comments

Comments
 (0)