From c1fa611f4dd8ba9f5f76931db39050941fb745ae Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 4 Feb 2017 23:15:16 +0300 Subject: [PATCH] Adds an attempt to fix the CI Changes: 1. Fixes the licence information in the `plugin.zsh` to be MIT 2. Fixes link in the README 3. Fixes some tests Closes #54 --- .ci/script.sh | 4 +--- .travis.yml | 4 ---- README.md | 2 +- git-secret.plugin.zsh | 6 +----- src/main.sh | 2 +- tests/test_init.bats | 1 - 6 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.ci/script.sh b/.ci/script.sh index 3a441376..a97d402c 100644 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -15,7 +15,7 @@ if [[ ! -z "$DOCKER_DIST" ]]; then fi # Local builds: -if [[ "$GITSECRET_DIST" == "brew" ]] || [[ "$GITSECRET_DIST" == "brew" ]]; then +if [[ "$GITSECRET_DIST" == "brew" ]] || [[ "$GITSECRET_DIST" == "none" ]]; then # Only running `make test` on standard (non-docker) build, # since it is called inside the docker container anyway. make test @@ -25,6 +25,4 @@ if [[ ! -z "$(command -v shellcheck)" ]]; then # This means, that `shellcheck` does exist, so run it: echo 'running lint' find src utils -type f -name '*.sh' -print0 | xargs -0 -I {} shellcheck {} - # TODO: add tests to lint - # see: https://github.com/koalaman/shellcheck/issues/709 fi diff --git a/.travis.yml b/.travis.yml index fb99efa4..38cb4b9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,10 +39,6 @@ matrix: - debian-sid packages: - shellcheck - - os: osx - env: GITSECRET_DIST="brew"; GITSECRET_GPG_DEP="gnupg"; SECRETS_GPG_COMMAND="gpg" - sudo: false - language: generic - os: osx env: GITSECRET_DIST="brew"; GITSECRET_GPG_DEP="gnupg2"; SECRETS_GPG_COMMAND="gpg2" sudo: false diff --git a/README.md b/README.md index 4be788bf..a702095e 100644 --- a/README.md +++ b/README.md @@ -34,4 +34,4 @@ MIT. See [LICENSE.md](LICENSE.md) for details. ## Thanks -Special thanks to [Elio Qoshi](https://elioqoshi.me/sq/) from [ura](http://ura.al/) for the awesome logo. +Special thanks to [Elio Qoshi](https://elioqoshi.me/sq/) from [ura](http://ura.design/) for the awesome logo. diff --git a/git-secret.plugin.zsh b/git-secret.plugin.zsh index 61977e1f..824a57be 100644 --- a/git-secret.plugin.zsh +++ b/git-secret.plugin.zsh @@ -2,11 +2,7 @@ # Copyright 2016 Sobolev Nikita # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 +# Licensed under the MIT License # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/main.sh b/src/main.sh index 11c22598..100576d0 100755 --- a/src/main.sh +++ b/src/main.sh @@ -6,7 +6,7 @@ function _check_setup { # Checking git and secret-plugin setup: local is_tree is_tree=$(_is_inside_git_tree) - if [[ $is_tree != "0" ]]; then + if [[ ! $is_tree -eq 0 ]]; then _abort "repository is broken. try running 'git init' or 'git clone'." fi diff --git a/tests/test_init.bats b/tests/test_init.bats index 3f6b0241..0d93aaf1 100644 --- a/tests/test_init.bats +++ b/tests/test_init.bats @@ -18,7 +18,6 @@ function teardown { run git secret init [ "$status" -eq 1 ] - [ "$output" = "repository is broken. try running 'git init' or 'git clone'. abort." ] }