Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sed a little more cross platformable. #3629

Merged
merged 7 commits into from
Nov 22, 2019
Merged

Make sed a little more cross platformable. #3629

merged 7 commits into from
Nov 22, 2019

Conversation

brimstone
Copy link
Contributor

@brimstone brimstone commented Nov 21, 2019

What: Make sed a little more cross platform.

Why: go:generate should work on linux AND macOS

Please describe the tests: No more tests.

Please describe the performance impact: No impact.

Code Review Checklist (to be filled out by reviewer)

  • NEW: Are there any Satellite database migrations? Are they forwards and backwards compatible?
  • Does the PR describe what changes are being made?
  • Does the PR describe why the changes are being made?
  • Does the code follow our style guide?
  • Does the code follow our testing guide?
  • Is the PR appropriately sized? (If it could be broken into smaller PRs it should be)
  • Does the new code have enough tests? (every PR should have tests or justification otherwise. Bug-fix PRs especially)
  • Does the new code have enough documentation that answers "how do I use it?" and "what does it do?"? (both source documentation and higher level, diagrams?)
  • Does any documentation need updating?
  • Do the database access patterns make sense?

@brimstone brimstone requested a review from a team November 21, 2019 19:17
@cla-bot cla-bot bot added the cla-signed label Nov 21, 2019
@ghost ghost requested review from crawter and VinozzZ and removed request for a team November 21, 2019 19:18
@brimstone brimstone requested review from rikysya and zeebo and removed request for crawter and VinozzZ November 21, 2019 19:19
@brimstone brimstone added Request Code Review Code review requested Reviewer Can Merge If all checks have passed, non-owner can merge PR labels Nov 21, 2019
@zeebo
Copy link
Contributor

zeebo commented Nov 21, 2019

I'm still getting errors running this. I think the problem is that go:generate only interprets " as grouping, so it needs to be

//go:generate sed -i'' "1i //lint:file-ignore * generated file\n" satellitedb.dbx.go

@brimstone
Copy link
Contributor Author

Do those quotes work?

@zeebo
Copy link
Contributor

zeebo commented Nov 21, 2019

Yes, but then the -i'' is broken with gnused (linux).

@zeebo
Copy link
Contributor

zeebo commented Nov 21, 2019

//go:generate bash -c "sed -i'' '1i //lint:file-ignore * generated file\n' satellitedb.dbx.go"

seems to work for me.

@zeebo
Copy link
Contributor

zeebo commented Nov 21, 2019

Be sure to run go generate after as well because it doesn't have a newline that currently exists.

@zeebo zeebo merged commit 9af97d3 into master Nov 22, 2019
@zeebo zeebo deleted the mr/fix-sed branch November 22, 2019 18:17
bryanchriswhite added a commit that referenced this pull request Nov 25, 2019
* storj/master: (63 commits)
  web/satellite:  token payments logic (#3581)
  satellite/metainfo: reduce pointerDB access for CommitObject (#3589)
  satellite/metainfo: Fix misspelling in comment (#3636)
  argon2: choose a steady parallelism value (#3630)
  satellitedb: add support to testplanet for cockroachdb (#3634)
  satellite/console/auth: return in error handle added (#3639)
  Make sed a little more cross platformable (#3629)
  web: ms edge support bug fixed (#3638)
  web/satellite: registration/welcome message fixed, usage-report url fixed, storj-sim fixed (#3622)
  web/satellite: fonts changed to Inter (#3620)
  storagenode/updater: read identity location from storagenode's config.yaml (#3607)
  cmd/segment-reaper: Implement bitmask type (#3626)
  storagenode/gracefulexit: improve logging (#3633)
  private/testplanet: add a mock referral manager server into testplanet (#3631)
  satellite/gracefulexit: refactor concurrency (#3624)
  pkg/pb/referralmanager: update to add satellite ID to Get Tokens request (#3625)
  satellite/metainfo: improve Loop comments (#3595)
  storagenode: add bandwidth metrics (#3623)
  satellite/console: Add security headers (#3615)
  satellite/payments: token deposit accept cents (#3628)
  ...
bryanchriswhite pushed a commit to bryanchriswhite/storj that referenced this pull request Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed Request Code Review Code review requested Reviewer Can Merge If all checks have passed, non-owner can merge PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants