Circleci/os-detect replacement?

The circleci/os-detect orb repository was archived on November 8th, 2022.

Is there a replacement for this feature?

HI @fmorency,

I don’t believe there will be a replacement for the circleci/os-detect orb, but you can implement the same functionality with a run step similar to this:

- run:
    shell: bash
    name: Identifying OS
    command: |
      case $(uname) in
        [Ll]inux*)
          if [ -f /.dockerenv ]; then
            echo 'export EXECUTOR=docker' >> $BASH_ENV
          else
            echo 'export EXECUTOR=linux' >> $BASH_ENV
          fi
          ;;
        [Dd]arwin*)
          echo 'export EXECUTOR=macos' >> $BASH_ENV
          ;;
        msys*|MSYS*|nt|win*)
          echo 'export EXECUTOR=windows' >> $BASH_ENV
          ;;
      esac
      source $BASH_ENV

Let me know if this helps.

Thanks, @yannCI.

It’s unfortunate; this solution is less convenient.

Suggestion: Add a note in the os-detect Github README about this.

Hey @fmorency, my name is Ricardo and I created the OS Detect orb. Just wanted to provide some additional information.

As you know, the OS Detect orb has been End-of-life’d and thus archived on GitHub. The orb as it exist still technically works but it will never receive another update. EOL’ing the orb was a decision made by my team based on low usage and a different direction we wanted to go as a team as a whole.

That being said, I run A LOT of open source projects and find the OS Detect orb extremely useful for my use cases thus I have forked it into my CI related GitHub org called HubCI. The new orb is called Sphere and it picks up where OS Detect left off. You can find the Developer Hub page here and the GitHub page here.

It’s currently the same as OS Detect but if you liked what the orb does now, I have a lot of ideas for what to add in 2023 that would make it even more useful.

Just please keep in mind, my fork is not considered to be a CircleCI “certified” orb. The hubci/sphere orb would be considered a 3rd party orb since it’s just by me and not CircleCI.

2 Likes

Hi @FelicianoTech,
This is great news. Thank you!
-F

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.