Skip to content

Commit

Permalink
QD-8543 Update product feed with the recent 2024.1 EAP
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Mar 28, 2024
1 parent 1c8386b commit 12a5268
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/scripts/verifyChecksums.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const fs = require('fs');
const https = require('https');

const jsonFilePath = '../../feed/releases.json';

function httpsGet(url) {
return new Promise((resolve, reject) => {
https.get(url, (res) => {
let data = '';
res.on('data', (chunk) => data += chunk);
res.on('end', () => resolve(data));
}).on('error', (err) => reject(err));
});
}

async function verifyChecksumLink(link, checksumLink) {
try {
const data = await httpsGet(checksumLink);
const archiveName = link.split('/').pop();
if (data.includes(archiveName)) {
console.log(`✅ Verified: ${link}`);
} else {
console.error(`❌ Checksum does not contain archive name for ${link}`);
}
} catch (error) {
console.error(`Error fetching ${checksumLink}: ${error.message}`);
}
}

async function verifyChecksums(data) {
for (const product of data) {
console.log(`::group::Product Code: ${product.Code}`);
for (const release of product.Releases) {
for (const downloadInfo of Object.values(release.Downloads)) {
await verifyChecksumLink(downloadInfo.Link, downloadInfo.ChecksumLink);
}
}
console.log('::endgroup::');
}
}

fs.readFile(jsonFilePath, 'utf8', async (err, data) => {
if (err) {
console.error(`Error reading file from disk: ${err}`);
} else {
const releasesData = JSON.parse(data);
await verifyChecksums(releasesData);
}
});
22 changes: 22 additions & 0 deletions .github/workflows/feed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Feed'
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'feed/releases.json'
pull_request:
paths:
- 'feed/releases.json'

jobs:
verify-links:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: .github/scripts
steps:
- uses: actions/checkout@v4
- run: node verifyChecksums.js
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ git clone [email protected]:JetBrains/qodana-docker.git
docker buildx bake
```

`cd` into `.github/scripts` and run the script to check product feed if you edited something in `feed/releases.json`:

```shell
cd .github/scripts && node verifyChecksums.js
```

## Create a commit

Commit messages should be well formatted, and to make that "standardized", we are using [internal issue tracker](https://youtrack.jetbrains.com) references.
Expand Down
130 changes: 130 additions & 0 deletions feed/releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,136 @@
"MajorVersion": "2023.3",
"Build": "233.12259.111",
"PrintableReleaseType": null
},
{
"Date": "2024-03-18",
"Type": "eap",
"Downloads": {
"linux": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48.tar.gz.sha256"
},
"linuxARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48-aarch64.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48-aarch64.tar.gz.sha256"
},
"windowsZip": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48.win.zip.sha256"
},
"windowsZipARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48-aarch64.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDNET-241.15106.48-aarch64.win.zip.sha256"
}
}
}
]
},
{
"Code": "IIU",
"Releases": [
{
"Date": "2024-03-18",
"Type": "eap",
"Downloads": {
"linux": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38.tar.gz.sha256"
},
"linuxARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38-aarch64.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38-aarch64.tar.gz.sha256"
},
"windowsZip": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38.win.zip.sha256"
},
"windowsZipARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38-aarch64.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVM-241.14881.38-aarch64.win.zip.sha256"
}
}
}
]
},
{
"Code": "IIC",
"Releases": [
{
"Date": "2024-03-18",
"Type": "eap",
"Downloads": {
"linux": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52.tar.gz.sha256"
},
"linuxARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52-aarch64.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52-aarch64.tar.gz.sha256"
},
"windowsZip": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52.win.zip.sha256"
},
"windowsZipARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52-aarch64.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDJVMC-241.14884.52-aarch64.win.zip.sha256"
}
}
}
]
},
{
"Code": "PCP",
"Releases": [
{
"Date": "2024-03-18",
"Type": "eap",
"Downloads": {
"linux": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33.tar.gz.sha256"
},
"linuxARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33-aarch64.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33-aarch64.tar.gz.sha256"
},
"windowsZip": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33.win.zip.sha256"
},
"windowsZipARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33-aarch64.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPY-241.14872.33-aarch64.win.zip.sha256"
}
}
}
]
},
{
"Code": "PCC",
"Releases": [
{
"Date": "2024-03-18",
"Type": "eap",
"Downloads": {
"linux": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33.tar.gz.sha256"
},
"linuxARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33-aarch64.tar.gz",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33-aarch64.tar.gz.sha256"
},
"windowsZip": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33.win.zip.sha256"
},
"windowsZipARM64": {
"Link": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33-aarch64.win.zip",
"ChecksumLink": "https://download.jetbrains.com/qodana/2024.1/qodana-QDPYC-241.14872.33-aarch64.win.zip.sha256"
}
}
}
]
}
Expand Down

0 comments on commit 12a5268

Please sign in to comment.