Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
33b4dee
chore(deps): bump golang from 1.18.1-buster to 1.18.2-buster
dependabot[bot] May 16, 2022
8410ac1
Merge pull request #89 from dokku/dependabot/docker/golang-1.18.2-buster
josegonzalez May 16, 2022
38efa84
chore(deps): bump golang from 1.18.2-buster to 1.18.4-buster
dependabot[bot] Jul 18, 2022
d17de9b
Merge pull request #91 from dokku/dependabot/docker/golang-1.18.4-buster
josegonzalez Aug 7, 2022
85885e1
chore(deps): bump golang from 1.18.4-buster to 1.19.5-buster
dependabot[bot] Jan 16, 2023
e3f831c
Merge pull request #97 from dokku/dependabot/docker/golang-1.19.5-buster
josegonzalez Jan 16, 2023
b35de83
chore: drop rpm support
Jan 16, 2023
97138e1
Merge pull request #98 from dokku/drop-rpm-support
josegonzalez Jan 16, 2023
c95f447
chore(deps): bump golang from 1.19.5-buster to 1.20.1-buster
dependabot[bot] Feb 20, 2023
18aad99
Merge pull request #100 from dokku/dependabot/docker/golang-1.20.1-bu…
josegonzalez Feb 20, 2023
1118379
chore(deps): bump golang from 1.20.1-buster to 1.20.3-buster
dependabot[bot] Apr 10, 2023
d01d024
Merge pull request #102 from dokku/dependabot/docker/golang-1.20.3-bu…
josegonzalez Apr 28, 2023
617ce14
chore(deps): bump golang from 1.20.3-buster to 1.20.4-buster
dependabot[bot] May 8, 2023
5637cf9
Merge pull request #103 from dokku/dependabot/docker/golang-1.20.4-bu…
josegonzalez May 13, 2023
7722ebb
chore: remove use of deprecated method for setting ci output values
josegonzalez May 29, 2023
1a8eef6
Merge pull request #104 from dokku/josegonzalez-patch-1
josegonzalez May 29, 2023
cf885b2
feat: add dependabot support to github actions
josegonzalez May 29, 2023
086d61c
Merge pull request #105 from dokku/josegonzalez-patch-1
josegonzalez May 29, 2023
925a2b3
chore(deps): bump actions/checkout from 2 to 3
dependabot[bot] May 29, 2023
e79bbe2
chore(deps): bump hadolint/hadolint-action from 1.6.0 to 3.1.0
dependabot[bot] May 29, 2023
5ae5361
chore(deps): bump ibiqlik/action-yamllint from 3.0.4 to 3.1.1
dependabot[bot] May 29, 2023
0d714af
chore(deps): bump actions/upload-artifact from 2 to 3
dependabot[bot] May 29, 2023
7f80f8d
fix: set correct labels
josegonzalez May 29, 2023
8b55741
Merge pull request #106 from dokku/dependabot/github_actions/actions/…
josegonzalez May 29, 2023
6870fcd
Merge pull request #108 from dokku/dependabot/github_actions/hadolint…
josegonzalez May 29, 2023
0e7441b
Merge pull request #109 from dokku/dependabot/github_actions/ibiqlik/…
josegonzalez May 29, 2023
2ee39c9
chore(deps): bump ludeeus/action-shellcheck from 1.1.0 to 2.0.0
dependabot[bot] May 29, 2023
0d25c42
Merge pull request #111 from dokku/dependabot/github_actions/actions/…
josegonzalez May 29, 2023
107ddb4
fix: remove extra whitespace
josegonzalez May 29, 2023
300863a
chore(deps): bump luizm/action-sh-checker from 0.3.0 to 0.7.0
dependabot[bot] May 29, 2023
d251b55
Merge pull request #110 from dokku/dependabot/github_actions/ludeeus/…
josegonzalez May 29, 2023
cc7868e
Merge pull request #107 from dokku/dependabot/github_actions/luizm/ac…
josegonzalez May 29, 2023
2a46bbc
chore: remove references to EOL stretch and bionic distributions
josegonzalez Jun 12, 2023
f0c71bf
Merge pull request #112 from dokku/josegonzalez-patch-1
josegonzalez Jun 12, 2023
a381cbe
chore(deps): bump golang from 1.20.4-buster to 1.20.5-buster
dependabot[bot] Jun 12, 2023
041c59d
Add Bookworm Support
Coffee2CodeNL Jul 31, 2023
f7d4971
Merge pull request #114 from Coffee2CodeNL/add_bookworm_support
josegonzalez Jul 31, 2023
fa335d3
fix: use tabs instead of spaces
josegonzalez Jul 31, 2023
cc2bb87
Merge pull request #113 from dokku/dependabot/docker/golang-1.20.5-bu…
josegonzalez Aug 6, 2023
549ae19
Release 0.17.0
josegonzalez Aug 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ updates:
directory: "/"
schedule:
interval: "weekly"
labels:
- "type: dependencies"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- "type: dependencies"
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
fail-fast: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: extract branch name
shell: bash
run: |
if [[ "$GITHUB_REF" == *"/pull/"* ]]; then
echo "##[set-output name=branch;]${GITHUB_HEAD_REF#refs/heads/}"
echo "branch=${GITHUB_HEAD_REF#refs/heads/}" >> $GITHUB_OUTPUT
else
echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}"
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
fi
id: extract_branch

Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
CI_BRANCH: ${{ steps.extract_branch.outputs.branch }}

- name: upload packages
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build
path: build
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run hadolint
uses: hadolint/hadolint-action@d7b38582334d9ac11c12021c16f21d63015fa250
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf
# v1.6.0 => d7b38582334d9ac11c12021c16f21d63015fa250

markdown-lint:
name: markdown-lint
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run markdown-lint
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb
# v1.5.0 => 04d43ee9191307b50935a753da3b775ab695eceb
Expand All @@ -39,9 +39,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run shellcheck
uses: ludeeus/action-shellcheck@94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
env:
SHELLCHECK_OPTS: -e SC2034
Expand All @@ -51,9 +51,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run shfmt
uses: luizm/action-sh-checker@7f44869033b40ee4ffe7dc76c87a1bc66e3d025a
uses: luizm/action-sh-checker@76ab0b22e1f194e4a582edc7969df6485c4e9246
# v0.3.0 => 7f44869033b40ee4ffe7dc76c87a1bc66e3d025a
env:
SHFMT_OPTS: -l -bn -ci -i 2 -d
Expand All @@ -65,9 +65,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Clone
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run yamllint
uses: ibiqlik/action-yamllint@ed2b6e911569708ed121c14b87d513860a7e36a7
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c
# v3.0.4 => ed2b6e911569708ed121c14b87d513860a7e36a7
with:
config_file: '.github/linters/.yamllint.yml'
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.18.1-buster
FROM golang:1.20.5-buster

# hadolint ignore=DL3027
RUN apt-get update \
&& apt install apt-transport-https build-essential curl gnupg2 jq lintian rpm rsync rubygems-integration ruby-dev ruby software-properties-common sudo -qy \
&& apt install apt-transport-https build-essential curl gnupg2 jq lintian rsync rubygems-integration ruby-dev ruby software-properties-common sudo -qy \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
37 changes: 3 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MAINTAINER_NAME = Jose Diaz-Gonzalez
REPOSITORY = sshcommand
HARDWARE = $(shell uname -m)
SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]')
BASE_VERSION ?= 0.16.0
BASE_VERSION ?= 0.17.0
IMAGE_NAME ?= $(MAINTAINER)/$(REPOSITORY)
PACKAGECLOUD_REPOSITORY ?= dokku/dokku-betafish

Expand Down Expand Up @@ -50,7 +50,6 @@ build: pre-build
@$(MAKE) build/darwin/$(NAME)
@$(MAKE) build/linux/$(NAME)
@$(MAKE) build/deb/$(NAME)_$(VERSION)_all.deb
@$(MAKE) build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm

build-docker-image:
docker build --rm -q -t $(IMAGE_NAME):build .
Expand Down Expand Up @@ -96,28 +95,6 @@ build/deb/$(NAME)_$(VERSION)_all.deb: build/linux/$(NAME)
build/linux/$(NAME)=/usr/bin/$(NAME) \
LICENSE=/usr/share/doc/$(NAME)/copyright

build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm: build/linux/$(NAME)
chmod 644 LICENSE
export SOURCE_DATE_EPOCH=$(shell git log -1 --format=%ct) \
&& mkdir -p build/rpm \
&& fpm \
--architecture x86_64 \
--category admin \
--description "$$PACKAGE_DESCRIPTION" \
--input-type dir \
--license 'MIT License' \
--maintainer "$(MAINTAINER_NAME) <$(EMAIL)>" \
--name $(NAME) \
--output-type rpm \
--package build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm \
--rpm-os linux \
--url "https://github.com/$(MAINTAINER)/$(REPOSITORY)" \
--vendor "" \
--version $(VERSION) \
--verbose \
build/linux/$(NAME)=/usr/bin/$(NAME) \
LICENSE=/usr/share/doc/$(NAME)/copyright

clean:
rm -rf build release validation

Expand All @@ -141,37 +118,29 @@ release: bin/gh-release bin/gh-release-body
tar -zcf release/$(NAME)_$(VERSION)_linux_$(HARDWARE).tgz -C build/linux $(NAME)
tar -zcf release/$(NAME)_$(VERSION)_darwin_$(HARDWARE).tgz -C build/darwin $(NAME)
cp build/deb/$(NAME)_$(VERSION)_all.deb release/$(NAME)_$(VERSION)_all.deb
cp build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm release/$(NAME)-$(VERSION)-1.x86_64.rpm
bin/gh-release create $(MAINTAINER)/$(REPOSITORY) $(VERSION) $(shell git rev-parse --abbrev-ref HEAD)
bin/gh-release-body $(MAINTAINER)/$(REPOSITORY) v$(VERSION)

release-packagecloud:
@$(MAKE) release-packagecloud-deb
@$(MAKE) release-packagecloud-rpm

release-packagecloud-deb: build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/ubuntu/bionic build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/ubuntu/focal build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/ubuntu/jammy build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/debian/stretch build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/debian/buster build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/debian/bullseye build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/debian/bookworm build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/raspbian/buster build/deb/$(NAME)_$(VERSION)_all.deb
package_cloud push $(PACKAGECLOUD_REPOSITORY)/raspbian/bullseye build/deb/$(NAME)_$(VERSION)_all.deb

release-packagecloud-rpm: build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm
package_cloud push $(PACKAGECLOUD_REPOSITORY)/el/7 build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm

validate: test
mkdir -p validation
lintian build/deb/$(NAME)_$(VERSION)_all.deb || true
dpkg-deb --info build/deb/$(NAME)_$(VERSION)_all.deb
dpkg -c build/deb/$(NAME)_$(VERSION)_all.deb
cd validation && ar -x ../build/deb/$(NAME)_$(VERSION)_all.deb
cd validation && rpm2cpio ../build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm > $(NAME)-$(VERSION)-1.x86_64.cpio
ls -lah build/deb build/rpm validation
ls -lah build/deb validation
sha1sum build/deb/$(NAME)_$(VERSION)_all.deb
sha1sum build/rpm/$(NAME)-$(VERSION)-1.x86_64.rpm

test: lint unit-tests

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sshcommand",
"version": "0.16.0",
"version": "0.17.0",
"description": "Turn SSH into a thin client specifically for your app",
"global": "true",
"install": "cp sshcommand /usr/local/bin && chmod +x /usr/local/bin/sshcommand",
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/core.bats
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ check_custom_allowed_keys() {
echo "status: $status"
assert_success

run bash -c "grep -F \"$(< "${TEST_KEY_DIR}/${TEST_KEY_NAME}.pub")\" ~${TEST_USER}/.ssh/authorized_keys | grep user1"
run bash -c "grep -F \"$(<"${TEST_KEY_DIR}/${TEST_KEY_NAME}.pub")\" ~${TEST_USER}/.ssh/authorized_keys | grep user1"
echo "output: $output"
echo "status: $status"
assert_success
Expand All @@ -183,7 +183,7 @@ check_custom_allowed_keys() {
echo "status: $status"
assert_success

run bash -c "grep -F \"$(< "${TEST_KEY_DIR}/${TEST_KEY_NAME}.pub")\" ~${TEST_USER}/.ssh/authorized_keys | grep user1"
run bash -c "grep -F \"$(<"${TEST_KEY_DIR}/${TEST_KEY_NAME}.pub")\" ~${TEST_USER}/.ssh/authorized_keys | grep user1"
echo "output: $output"
echo "status: $status"
assert_failure
Expand Down