Skip to content

Commit

Permalink
Fix #11: Only print files synced in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-carlborg committed Jul 3, 2022
1 parent c4ec2b8 commit 52ad2be
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.1] - 2022-07-03
### Changed
- Only print files synced in debug mode ([#11])(https://github.com/cross-platform-actions/action/issues/11)

## [0.6.0] - 2022-06-14
### Added
- Add support for OpenBSD 7.1 ([openbsd-builder#9](https://github.com/cross-platform-actions/openbsd-builder/pull/9))
Expand Down
9 changes: 7 additions & 2 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions src/action/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,19 @@ export class Action {
this.resourceDisk.unmount()
}

private get syncVerboseFlag(): string {
return core.isDebug() ? '-v' : ''
}

private async syncFiles(
ipAddress: string,
...excludePaths: string[]
): Promise<void> {
core.debug(`Syncing files to VM, excluding: ${excludePaths}`)
// prettier-ignore
await exec.exec('rsync', [
'-auvzrtopg',
'-auzrtopg',
this.syncVerboseFlag,
'--exclude', '_actions/cross-platform-actions/action',
...flatMap(excludePaths, p => ['--exclude', p]),
`${this.workDirectory}/`,
Expand All @@ -241,7 +246,8 @@ export class Action {
core.info('Syncing back files')
// prettier-ignore
await exec.exec('rsync', [
'-uvzrtopg',
'-uzrtopg',
this.syncVerboseFlag,
`runner@${ipAddress}:work/`,
this.workDirectory
])
Expand Down

0 comments on commit 52ad2be

Please sign in to comment.