Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
reitzig committed Jun 26, 2023
2 parents 9d3cea8 + 66e2f1e commit 09607e3
Show file tree
Hide file tree
Showing 21 changed files with 663 additions and 169 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
name: "Create Release"
runs-on: ubuntu-latest
steps:
- name: Is pre-release?
id: is_pre_release
run: |
version="${GITHUB_REF#refs/tags/}"
if [[ "${version}" =~ -.*$ ]]; then
echo ::set-output name=IS_PRERELEASE::true
else
echo ::set-output name=IS_PRERELEASE::false
fi
- name: Release
uses: docker://antonyurchenko/git-release:v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: ${{ steps.is_pre_release.outputs.IS_PRERELEASE }}
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"
102 changes: 102 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Tests

on:
push:
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
tests:
name: "Scenarios"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
steps:
- uses: actions/checkout@v3

# NB: We have a Docker setup for testing -- why do all this?
# Because we want to confirm it runs on macOS, and
# there are no Docker images based on frickin' macOS.

- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7

- name: Install Test Dependencies
working-directory: test
run: |
gem install bundler
bundle install
- name: Install SDKMAN!
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk version
- name: Install fish
uses: fish-actions/install-fish@v1.1.0

- name: Install sdkman-for-fish
shell: fish "{0}"
run: |
fish --version
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source \
&& fisher install jorgebucaran/fisher
fisher install .
- name: Confirm install
shell: fish "{0}"
run: |
cat /etc/os-release || sw_vers || true
fish --version
fisher --version
sdk version
- name: Run Tests
working-directory: test
run: |
cucumber --publish-quiet --tags "not @pending"
confirm-installation:
name: "Check fisher install"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- 'ubuntu-22.04'
- 'macos-latest'
steps:
- name: Install fish
uses: fish-actions/install-fish@v1.1.0

- name: Install SDKMAN!
run: |
curl -s "https://get.sdkman.io" | bash
- name: Install fisher
shell: fish "{0}"
run: |
fish --version
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source \
&& fisher install jorgebucaran/fisher
fisher --version
- name: Install sdkman-for-fish
shell: fish "{0}"
run: |
fisher install reitzig/sdkman-for-fish@${{ github.sha }}
- name: Confirm install
shell: fish "{0}"
run: |
cat /etc/os-release || sw_vers || true
fish --version
fisher ls
sdk version
7 changes: 2 additions & 5 deletions .idea/runConfigurations/Test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - upcoming

### Breaking

- Drop (explicit) support for Fish 2

### Features

- Support custom SDKMAN! install path (issue #34)
- Compatibility with SDKMAN! 5.18.2
- Completions for `env`, `home`, `flush` (issue #35)
- Correct behaviour of `env clear`.
- Honor `sdkman_auto_env=true` (issue #38)
- `broadcast` removed
- Compatibility with fisher 4 (PR #37, #39)

## [1.4.0] - 2019-11-06

### Features

- Compatibility with macOS (issue #29)

## [1.3.0] - 2019-11-05

### Features

- Install SDKMAN! if missing (issue #26)

## [1.2.0] - 2019-07-31

### Features

- Compatibility with fish 3 (issue #27)

## [1.1.2] - 2019-01-06

### Fixes

- Re-initialize if user has changed (issue #25)

## [1.1.1] - 2018-11-09

### Fixes

- Set `_HOME` environment variables (issue #24)

## [1.1.0] - 2018-10-08

### Features

- Compatibility with fisher 3 (PR #22)

## [1.0.0] - 2018-07-21

Initial release.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Raphael Reitzig
Copyright (c) 2018-2022 Raphael Reitzig

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,40 @@
Makes command `sdk` from [SDKMAN!] usable from [fish], including auto-completion.
Also adds binaries from installed SDKs to the PATH.

Version 1.4.0 tested with
Version 2.0.0 has been tested with

- fish 2.7.1 and 3.1.2, and
- SDKMAN! 5.8.2, on
- Ubuntu 18.04 LTS and macOS 10.13
- fish 3.6.1, and
- SDKMAN! 5.18.2, on
- Ubuntu 22.04 LTS and macOS 12.6

## Install

With [fisher] (install separately):

```
fisher install reitzig/sdkman-for-fish@v1.4.0
fisher install reitzig/sdkman-for-fish@v2.0.0
```

_Note:_

- Only compatible with fisher v3 upwards; v2 is no longer supported.
- Only compatible with fisher v4 upwards; v3 is no longer supported.
- You have to install [SDKMAN!] separately.
- If you have installed SDKMAN! at a custom location, you need to add
```fish
set -g __sdkman_custom_dir /your/path/to/sdkman
```
to a fish config file
[run _before_](https://fishshell.com/docs/current/language.html#configuration-files)
`.config/fish/conf.d/sdk.fish`;
for example, you can use `.config/fish/conf.d/config_sdk.fish`.


## Usage

It's all in the background; you should be able to run `sdk` and binaries installed
with `sdk` as you would expect.


## Contribute

When you make changes,
Expand Down Expand Up @@ -65,6 +75,7 @@ done
wait
```


## Acknowledgements

* Completion originally by [Ted Wise](https://github.com/ctwise); see his
Expand All @@ -81,5 +92,3 @@ wait
[SDKMAN!]: https://github.com/sdkman/sdkman-cli
[fish]: https://fishshell.com/
[fisher]: https://github.com/jorgebucaran/fisher
[travis-link]: https://travis-ci.org/reitzig/sdkman-for-fish
[travis-badge]: https://travis-ci.org/reitzig/sdkman-for-fish.svg?branch=master
Loading

0 comments on commit 09607e3

Please sign in to comment.