Skip to content

Commit

Permalink
Add Linux::Elementary
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed May 20, 2024
1 parent b896311 commit a45856e
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 46 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Debian variations
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# NB Ubuntu is covered in .github/workflows/linux.yml, which tests a
# zillion different versions of perl
- container: debian:stable
name: Linux::RealDebian
- container: devuan/devuan:latest
name: Linux::Devuan
- container: elementary/docker:stable
name: Linux::Elementary
container:
image: ${{ matrix.container}}
steps:
- uses: actions/checkout@v4
- name: Test on ${{ matrix.name }} - ${{ matrix.container }}
run: |
cat /etc/os-release
apt-get update
yes|apt-get install perl-base build-essential make gcc
yes|perl -MCPAN -e 'install qw(App::cpanminus install local::lib Expect)'
export PERL5OPT=-Mlocal::lib
/usr/local/bin/cpanm --installdeps .
perl makefile-expect-driver.pl Linux::Debian Linux Unix OSFeatures::POSIXShellRedirection HWCapabilities::Int64 ${{ matrix.name }}
make test
22 changes: 0 additions & 22 deletions .github/workflows/devuan-linux.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/real-debian.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ lib/Devel/AssertOS/Linux/PopOS.pm
lib/Devel/AssertOS/Linux/Slackware.pm
lib/Devel/AssertOS/Linux/Gentoo.pm
lib/Devel/AssertOS/Linux/Oracle.pm
lib/Devel/AssertOS/Linux/Elementary.pm
2 changes: 1 addition & 1 deletion lib/Devel/AssertOS/Linux/Debian.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ no warnings 'redefine';

our $VERSION = '1.2';

sub matches { map { "Linux::$_" } qw(Raspbian Ubuntu RealDebian UnknownDebianLike Devuan) }
sub matches { map { "Linux::$_" } qw(Raspbian Ubuntu RealDebian UnknownDebianLike Devuan Elementary) }

sub os_is { Devel::CheckOS::os_is(matches()) }

Expand Down
33 changes: 33 additions & 0 deletions lib/Devel/AssertOS/Linux/Elementary.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package Devel::AssertOS::Linux::Elementary;

use Devel::CheckOS;
use strict;
use warnings;
no warnings 'redefine';

use Devel::CheckOS::Helpers::LinuxOSrelease 'distributor_id';

our $VERSION = '1.1';

sub os_is {
my $id = distributor_id;

Devel::CheckOS::os_is('Linux') &&
defined($id) &&
$id eq 'elementary';
}

sub expn { "The operating system is Elementary" }

Devel::CheckOS::die_unsupported() unless(os_is());

=head1 COPYRIGHT and LICENCE
Copyright 2024 David Cantrell
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively.
=cut

1;

0 comments on commit a45856e

Please sign in to comment.