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

Add MacOS support for typescript model build script #1457

Merged
merged 2 commits into from
Feb 28, 2024

Conversation

Jdubrick
Copy link
Contributor

What does this PR do?

This PR adds support for recognizing if the user running the script is on MacOS. Due to the fact that some commands work differently if they are on freeBSD (Mac) or GNU/Linux.

The changes include:

  1. Detecting what OS a user is on and grabbing the directory path appropriately. realpath is used for Darwin and readlink -m is used for everything else.
  2. Using the detected OS it alters the sed command to ensure it works for all users.

Which issue(s) does this PR fix

fixes #1380

PR acceptance criteria

Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.

  • Open new test/doc issues under the devfile/api repo
  • Check each criteria if:
  • There is a separate tracking issue. Add the issue link under the criteria
    or
  • test/doc updates are made as part of this PR
  • If unchecked, explain why it's not needed

How to test changes / Special notes to the reviewer

Try and build the typescript model by running bash ./build/typescript-model/generate.sh from the root of the api repo.

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.75%. Comparing base (ee044f7) to head (6b9cfed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1457   +/-   ##
=======================================
  Coverage   35.75%   35.75%           
=======================================
  Files          52       52           
  Lines        6696     6696           
=======================================
  Hits         2394     2394           
  Misses       4158     4158           
  Partials      144      144           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

openshift-ci bot commented Feb 28, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Jdubrick, michael-valdron, thepetk

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Jdubrick Jdubrick merged commit 3263277 into devfile:main Feb 28, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues with MacOS in Building Typescript Model for devfile/api
3 participants