Skip to content

Commit e8155c4

Browse files
committed
chore: update-commands
updating release script
1 parent 477b7f2 commit e8155c4

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

tools/release/commands/commands.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ import { Effect, Stream, Console } from 'effect';
22
import { Command } from '@effect/platform';
33

44
export const buildPackages = Command.make('pnpm', 'build').pipe(
5-
Command.string,
6-
Effect.flatMap((output) => Console.log(output)),
5+
Command.lines,
6+
Stream.tap((line) => Console.log(`Build: ${line}`)),
7+
Stream.runDrain,
78
);
9+
810
// Effect to check git status for staged files
911
export const checkGitStatus = Command.make('git', 'status', '--porcelain').pipe(
1012
Command.string,
@@ -32,15 +34,15 @@ export const runChangesetsSnapshot = Command.make(
3234
'--snapshot',
3335
'beta',
3436
).pipe(
35-
Command.lines, // Get output line by line
36-
Effect.tap((line) => Console.log(`Changesets: ${line}`)), // Log output
37+
Command.lines,
38+
Stream.tap((line) => Console.log(`Changesets: ${line}`)),
3739
Stream.runDrain, // Consume the stream and wait for completion
3840
Effect.tapBoth({
3941
onFailure: (error) =>
4042
Effect.fail(Console.error(`Changesets snapshot command failed: ${error}`)),
4143
onSuccess: () => Console.log('Changesets snapshot completed successfully.'),
4244
}),
43-
Effect.asVoid, // Don't need the final result
45+
Effect.asVoid,
4446
);
4547

4648
// Effect to start local registry (run in background)
@@ -62,9 +64,10 @@ export const publishPackages = Command.make(
6264
'--tag',
6365
'beta',
6466
'--registry=http://localhost:4873',
67+
'--no-git-checks',
6568
).pipe(
66-
Command.lines, // Stream output line by line
67-
Effect.tap((line) => Console.log(`Publish: ${line}`)),
69+
Command.lines,
70+
Stream.tap((line) => Console.log(`Publish: ${line}`)),
6871
Stream.runDrain,
6972
Effect.tapBoth({
7073
onFailure: (error) => Effect.fail(() => Console.error(`Publishing failed: ${error}`)),

tools/release/release.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable import/extensions */
12
import { Effect, Console } from 'effect';
23
import { NodeContext, NodeRuntime } from '@effect/platform-node';
34
import { FileSystem, Path } from '@effect/platform';
@@ -55,6 +56,7 @@ const program = Effect.gen(function* () {
5556
yield* Console.log('Running Changesets snapshot version...');
5657
yield* runChangesetsSnapshot;
5758

59+
yield* Console.log('Starting Verdaccio');
5860
yield* startLocalRegistry;
5961
yield* Console.log('Waiting for local registry to initialize... (5 seconds)');
6062
yield* Effect.sleep('5 seconds');
@@ -66,8 +68,8 @@ const program = Effect.gen(function* () {
6668
'Release script finished. Local registry should still be running in the background.',
6769
);
6870

71+
yield* Console.log('Registry Url: -> http://localhost:4873');
6972
yield* restoreGitFiles;
70-
7173
yield* Effect.never; // Keep script running if needed, e.g., for background process
7274
}).pipe(
7375
Effect.catchAll((error) => {

0 commit comments

Comments
 (0)