Skip to content

Commit

Permalink
Switch to new μpkg package format
Browse files Browse the repository at this point in the history
  • Loading branch information
andsens committed May 21, 2024
1 parent 75d03ba commit e4a71e2
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 13 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint

on:
push:
branches: ['*']
tags: ['!v*']
workflow_call: {}

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -x
18 changes: 18 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release

on:
push:
tags: ['v*']

jobs:
lint:
uses: ./.github/workflows/lint.yaml
secrets: inherit
release:
needs: [lint]
permissions:
contents: write
runs-on: ubuntu-latest
name: Create GitHub release
steps:
- uses: orbit-online/upkg-release@v1
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ A small helper to ensure required commands exist

## Installation

With [μpkg](https://github.com/orbit-online/upkg)

```
upkg install -g orbit-online/checkdeps@<VERSION>
```
See [the latest release](https://github.com/orbit-online/checkdeps/releases/latest) for instructions.

## Usage

Expand Down
5 changes: 3 additions & 2 deletions checkdeps.sh → bin/checkdeps
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
# shellcheck source-path=..

checkdeps() {
set -eo pipefail; shopt -s inherit_errexit
local pkgroot; pkgroot=$(dirname "$(realpath "${BASH_SOURCE[0]}")")
source "$pkgroot/.upkg/orbit-online/records.sh/records.sh"
local pkgroot; pkgroot=$(realpath "$(dirname "$(realpath "${BASH_SOURCE[0]}")")/..")
source "$pkgroot/.upkg/records.sh/records.sh"

local deps=("$@") dep out ret=0
for dep in "${deps[@]}"; do
Expand Down
13 changes: 7 additions & 6 deletions upkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"commands": {
"checkdeps": "checkdeps.sh"
},
"dependencies": {
"orbit-online/records.sh": "v0.9.5"
}
"name": "checkdeps",
"dependencies": [
{
"tar": "https://github.com/orbit-online/records.sh/releases/download/v1.0.0/records.sh.tar.gz",
"sha256": "0469f15f5b689cb29b30f2a3b233c61856eb209fc50c74ef141120bbf70697f1"
}
]
}

0 comments on commit e4a71e2

Please sign in to comment.