Skip to content

Commit

Permalink
Merge PR #840 from '6.x-proposal'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Aug 10, 2023
2 parents a416c96 + 5a87588 commit b0a0fed
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 15 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/release-notes-6.x.md
Expand Up @@ -76,5 +76,6 @@ a plugin. Configurations with `wallet-` prefix will be passed to the wallet.
- \[[`2bb8f0b0`](https://github.com/handshake-org/hsd/commit/2bb8f0b0)] - [#810](https://github.com/handshake-org/hsd/pull/810) - **docs**: Minor doc fix about release docs (@nodech - Nodari Chkuaselidze)
- \[[`6b47c3a0`](https://github.com/handshake-org/hsd/commit/6b47c3a0)] - [#805](https://github.com/handshake-org/hsd/pull/805) - **net**: update last checkpoint. (@nodech - Nodari Chkuaselidze)
- \[[`008374ca`](https://github.com/handshake-org/hsd/commit/008374ca)] - [#800](https://github.com/handshake-org/hsd/pull/800) - **docs**: backport v5.0.0 release notes. (@nodech - Nodari Chkuaselidze)
- \[[`500d638d`](https://github.com/handshake-org/hsd/commit/500d638d)] - [#838](https://github.com/handshake-org/hsd/pull/838) - **scripts**: Update hs-client generator. (@nodech - Nodari Chkuaselidze)

[hs-client]: https://github.com/handshake-org/hs-client
6 changes: 4 additions & 2 deletions docs/release-schedule.md
Expand Up @@ -6,5 +6,7 @@ Maintenance period
| v3.x | 2021-10-14 | 2022-10-31 | 2023-04-30 |
| v4.x | 2022-04-30 | 2023-04-30 | 2023-10-31 |
| v5.x | 2023-01-19 | 2023-10-31 | 2024-04-30 |
| v6.x | 2023-04-30 | 2024-04-30 | 2024-10-31 |
| v7.x | 2023-10-31 | after v9.0 | after v10.0 |
| v6.x | 2023-08-10 | 2024-04-30 | 2024-10-31 |
| v7.x | 2024-04-30 | 2024-10-31 | 2024-04-30 |
| v8.x | 2024-10-31 | 2025-04-30 | 2025-10-31 |
| v9.x | 2025-04-30 | 2025-10-30 | 2026-04-30 |
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "hsd",
"version": "6.0.0-rc.1",
"version": "6.0.0",
"description": "Cryptocurrency bike-shed",
"license": "MIT",
"repository": "git://github.com/handshake-org/hsd.git",
Expand Down
40 changes: 30 additions & 10 deletions scripts/gen-hsclient.js
Expand Up @@ -62,7 +62,9 @@ const COPY_FILES = [
'bin/hsw-rpc',
'lib/client/index.js',
'lib/client/wallet.js',
'lib/client/node.js'
'lib/client/node.js',
'LICENSE',
'SECURITY.md'
];

const README = `
Expand Down Expand Up @@ -139,22 +141,36 @@ async function setupPackageContent(dir) {
return hsClientPkg;
}

async function setupGit(dir, version, log) {
async function setupGit(dir, log) {
const commands = [
'git init -b master',
`git remote add origin ${REMOTE}`,
'git fetch -q origin master',
'git pull -q origin master',
'git rm -r .'
];

log('Setting up git: ', dir);

for (const cmd of [...commands]) {
log(` > ${cmd} in ${dir}.`);
log(await execCmd(cmd, dir, 20000));
commands.shift();
}
}

async function finalGit(dir, version, log) {
const commands = [
'git add .',
`git commit --gpg-sign -m "v${version}"`,
`git tag --sign v${version} -m "v${version}"`
];

const manualCommands = [
'git push -f origin master',
`git push -f origin v${version}`
'git push origin master',
`git push origin v${version}`
];

log('Setting up git: ', dir);

for (const cmd of [...commands]) {
log(` > ${cmd} in ${dir}.`);

Expand Down Expand Up @@ -199,16 +215,20 @@ async function setupGit(dir, version, log) {

const pkgDir = await ensureDir(dir);

if (!noSteps && !noGit)
await setupGit(pkgDir, log);

log(`Copying files to ${pkgDir}...`);
const pkg = await setupPackageContent(pkgDir);
let gitNext = null;

if (!noGit)
gitNext = await setupGit(pkgDir, pkg.version, log);

if (noSteps)
return;

let gitNext;

if (!noGit)
gitNext = await finalGit(pkgDir, pkg.version, log);

console.log(`Generated ${pkgDir}.`);
console.log('Next steps:');
console.log(` $ cd ${pkgDir}`);
Expand Down

0 comments on commit b0a0fed

Please sign in to comment.