Skip to content

Commit

Permalink
Version 0.2.2 pre-release
Browse files Browse the repository at this point in the history
There are a lot of changes, multiple things were refactored: tests,
some commands, building and meta.

Several critical bugs fixed.

Changes:
1. Fixed #74, when `_user_required` was not working after reimporting keys
2. Closes #73, now it is possible to provide multiple emails to the `killperson` command
3. Closes #72, now it is possible to provide multiple emails to the `tell` command
4. Closes #71, now every doc in this project refer to `git-secret.io` instead of old `gh-pages` website
5. Closes #70, now installation section is removed from main `man` file
6. Closes #69, now "See also" section in the `man`s are clickable
7. Closes #61, added "Manual" section to the manuals
8. Closes #38, added `centos` container for `ci` testing
9. Refs #52, tests are refactored. Added `clean` command tests, removed a lot of hardcoded things, moved tests execution from `./temp` folder to `/tmp`, added a lot of new check in old tests, and some new test cases
10. Refactored `hide` and `clean` commands to be shorter
11. `shellcheck` is now supported with `make lint`

Additional features are not comming to 0.2.2 after this commit.
  • Loading branch information
sobolevn committed Feb 26, 2017
1 parent acdcb45 commit 8e39cdc
Show file tree
Hide file tree
Showing 62 changed files with 753 additions and 449 deletions.
2 changes: 1 addition & 1 deletion .ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ fi
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 {}
make lint
fi
4 changes: 2 additions & 2 deletions .docker/deb/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ MAINTAINER Nikita Sobolev ([email protected])
RUN apt-get update && \
apt-get install -y man make git apt-transport-https && \
apt-get install -y ruby ruby-dev ruby-build && \
apt-get autoremove && apt-get autoclean
apt-get autoremove && apt-get autoclean && \
mkdir /code

# This will increase the container size, but speed up the build,
# since this part will change, while the dependencies won't:

RUN mkdir /code
WORKDIR /code

# Removing `origin` for good:
Expand Down
25 changes: 25 additions & 0 deletions .docker/rpm/centos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM centos:latest

MAINTAINER Nikita Sobolev ([email protected])

ENV HOME /root

RUN yum update -y && \
yum install -y epel-release && \
yum install -y dnf && \
dnf update -y && \
dnf install -y gnupg man make gcc git tar > /dev/null && \
dnf install -y which pciutils redhat-rpm-config rpm-build zlib-devel && \
dnf -y group install 'Development tools' && \
dnf install -y ruby ruby-devel rubygems && \
dnf -y autoremove && \
mkdir /code

WORKDIR /code

# Removing `origin` for good:

RUN git clone -q https:/sobolevn/git-secret.git && \
cd git-secret && git remote rm origin

WORKDIR /code/git-secret
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Any logs, error output, etc?
----------------------------
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)


Any other comments?
-------------------
Expand Down
9 changes: 0 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,10 @@ Does this close any currently open issues?
------------------------------------------


Any relevant logs, error output, etc?
-------------------------------------
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?
-------------------

Where has this been tested?
---------------------------
**Operating system:**

**`git-secret` version:**

**Shell type and version:**
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,3 @@ temp/
build/
*.deb
*.fpm
test.txt
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ matrix:
services: docker
sudo: required
language: ruby
- os: linux
env: GITSECRET_DIST="rpm"; DOCKER_DIST="centos"
services: docker
sudo: required
language: ruby
- os: linux
env: GITSECRET_DIST="none"; GITSECRET_GPG_DEP="gnupg"; SECRETS_GPG_COMMAND="gpg"
sudo: required
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Only required if dealing with manuals, `gh-pages` or releases:
1. Firstly, you will need to setup development hooks with `make install-hooks`
2. Make changes to the files that need to be changed
3. When making changes to any files inside `src/` you will need to rebuild the binary `git-secret` with `make clean && make build` command
4. Run [`shellcheck`][shellcheck] against all your changes with `find src utils -type f -name '*.sh' -print0 | xargs -0 -I {} shellcheck {}`
4. Run [`shellcheck`][shellcheck] against all your changes with `make lint`
5. Now, add all your files to the commit with `git add --all` and commit changes with `git commit`, make sure you write a good message, which will explain your work
6. When running `git commit` the tests will run automatically, your commit will be canceled if they fail
7. Push to your repository, make a pull-request against `develop` branch. Please, make sure you have **one** commit per pull-request
7. Push to your repository, make a pull-request against `develop` branch. Please, make sure you have **one** commit per pull-request, it will be merge into one anyways

### Branches

Expand All @@ -55,7 +55,7 @@ CI is done with the help of `travis`. `travis` handles multiple environments:

### Release process

The release process is defined in the `git`-hooks and `.travis.yml`.
The release process is defined in the `git`-hooks and `.travis.yml`.

When creating a commit inside the `staging` branch (it is usually a documentation and changelog update with the version bump inside `src/version.sh`) it will trigger two main events.

Expand Down Expand Up @@ -88,6 +88,6 @@ Releases to `brew` are made manually.
[tracker]: https:/sobolevn/git-secret/issues
[help-wanted]: https:/sobolevn/git-secret/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22
[shellcheck]: https:/koalaman/shellcheck
[git-secret-site]: https://sobolevn.github.io/git-secret/
[git-secret-site]: http://git-secret.io
[bintray]: https://bintray.com/sobolevn
[Dockerhub]: https://hub.docker.com/r/sobolevn/git-secret/
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ test: install-test clean build
install-ronn:
@if [ ! `gem list ronn -i` == "true" ]; then gem install ronn; fi

.PHONY: clean-man
clean-man:
@find "man/" -type f ! -name "*.ronn" -delete

.PHONY: build-man
build-man: install-ronn
@ronn --roff man/*/*.ronn
build-man: install-ronn clean-man
@ronn --roff --organization="sobolevn" --manual="git-secret" man/*/*.ronn

.PHONY: build-gh-pages
build-gh-pages:
Expand All @@ -76,6 +80,10 @@ install-hooks:
.PHONY: develop
develop: clean build install-hooks

.PHONY: lint
lint:
@find src utils -type f -name '*.sh' -print0 | xargs -0 -I {} shellcheck {}

#
# Packaging:
#
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://img.shields.io/travis/sobolevn/git-secret/master.svg)](https://travis-ci.org/sobolevn/git-secret) [![Homebrew](https://img.shields.io/homebrew/v/git-secret.svg)](http://braumeister.org/formula/git-secret) [![Bintray deb](https://img.shields.io/bintray/v/sobolevn/deb/git-secret.svg)](https://bintray.com/sobolevn/deb/git-secret/view) [![Dockerhub](https://img.shields.io/docker/pulls/sobolevn/git-secret.svg)](https://hub.docker.com/r/sobolevn/git-secret/)

[![git-secret](https://raw.githubusercontent.com/sobolevn/git-secret/gh-pages/images/git-secret-big.png)](https://sobolevn.github.io/git-secret/)
[![git-secret](https://raw.githubusercontent.com/sobolevn/git-secret/gh-pages/images/git-secret-big.png)](http://git-secret.io/)

## What is `git-secret`?

Expand All @@ -14,11 +14,11 @@

## Usage

See the [git-secret site](https://sobolevn.github.io/git-secret/).
See the [git-secret site](http://git-secret.io/).

## Installation

See the [installation section](https://sobolevn.github.io/git-secret/#installation).
See the [installation section](http://git-secret.io/#installation).

## Contributing

Expand Down
7 changes: 5 additions & 2 deletions man/man1/git-secret-add.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http:/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-ADD" "1" "May 2016" "" ""
.TH "GIT\-SECRET\-ADD" "1" "February 2017" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-add\fR \- starts to track added files\.
Expand Down Expand Up @@ -32,5 +32,8 @@ It is not recommened to add filenames directly into the \fB\.gitsecret/paths/map
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-add\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1), git\-secret\-tell(1), git\-secret\-hide(1), git\-secret\-reveal(1)
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
7 changes: 6 additions & 1 deletion man/man1/git-secret-add.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ It is not recommened to add filenames directly into the `.gitsecret/paths/mappin
-h - shows this help.


## MANUAL

Run `man git-secret-add` to see this note.


## SEE ALSO

git-secret-init(1), git-secret-tell(1), git-secret-hide(1), git-secret-reveal(1)
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
11 changes: 7 additions & 4 deletions man/man1/git-secret-changes.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http:/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CHANGES" "1" "May 2016" "" ""
.TH "GIT\-SECRET\-CHANGES" "1" "February 2017" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-changes\fR \- view diff of the hidden files\.
Expand All @@ -10,12 +10,12 @@
.
.nf

git secret changes [\-h] [\-d dir] [\-p password] <pathspec>\.\.\.
git secret changes [\-h] [\-d dir] [\-p password] [pathspec]\.\.\.
.
.fi
.
.SH "DESCRIPTION"
\fBgit\-secret\-changes\fR \- shows changes between the current version of hidden files and the ones already commited\.
\fBgit\-secret\-changes\fR \- shows changes between the current version of hidden files and the ones already commited\. You can provide any number of files to this command as arguments, so it will show changes for these files only\. If no arguments are provided \- information about all files will be shown\.
.
.SH "OPTIONS"
.
Expand All @@ -27,5 +27,8 @@ git secret changes [\-h] [\-d dir] [\-p password] <pathspec>\.\.\.
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-changes\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-add(1), git\-secret\-tell(1), git\-secret\-hide(1), git\-secret\-reveal(1)
git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-hide(1) \fIhttp://git\-secret\.io/git\-secret\-hide\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
11 changes: 8 additions & 3 deletions man/man1/git-secret-changes.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ git-secret-changes - view diff of the hidden files.

## SYNOPSIS

git secret changes [-h] [-d dir] [-p password] <pathspec>...
git secret changes [-h] [-d dir] [-p password] [pathspec]...


## DESCRIPTION
`git-secret-changes` - shows changes between the current version of hidden files and the ones already commited.
`git-secret-changes` - shows changes between the current version of hidden files and the ones already commited. You can provide any number of files to this command as arguments, so it will show changes for these files only. If no arguments are provided - information about all files will be shown.


## OPTIONS
Expand All @@ -17,6 +17,11 @@ git-secret-changes - view diff of the hidden files.
-h - shows help.


## MANUAL

Run `man git-secret-changes` to see this note.


## SEE ALSO

git-secret-add(1), git-secret-tell(1), git-secret-hide(1), git-secret-reveal(1)
[git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-hide(1)](http://git-secret.io/git-secret-hide), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
7 changes: 5 additions & 2 deletions man/man1/git-secret-clean.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http:/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-CLEAN" "1" "February 2016" "" ""
.TH "GIT\-SECRET\-CLEAN" "1" "February 2017" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-clean\fR \- removes all the hidden files\.
Expand All @@ -26,5 +26,8 @@ git secret clean [\-v]
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-clean\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-whoknows(1), git\-secret\-add(1), git\-secret\-remove(1), git\-secret\-hide(1), git\-secret\-reveal(1)
git\-secret\-whoknows(1) \fIhttp://git\-secret\.io/git\-secret\-whoknows\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-remove(1) \fIhttp://git\-secret\.io/git\-secret\-remove\fR, git\-secret\-killperson(1) \fIhttp://git\-secret\.io/git\-secret\-killperson\fR
7 changes: 6 additions & 1 deletion man/man1/git-secret-clean.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ git-secret-clean - removes all the hidden files.
-h - shows this help.


## MANUAL

Run `man git-secret-clean` to see this note.


## SEE ALSO

git-secret-whoknows(1), git-secret-add(1), git-secret-remove(1), git-secret-hide(1), git-secret-reveal(1)
[git-secret-whoknows(1)](http://git-secret.io/git-secret-whoknows), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-remove(1)](http://git-secret.io/git-secret-remove), [git-secret-killperson(1)](http://git-secret.io/git-secret-killperson)
7 changes: 5 additions & 2 deletions man/man1/git-secret-hide.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http:/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-HIDE" "1" "February 2017" "" ""
.TH "GIT\-SECRET\-HIDE" "1" "February 2017" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-hide\fR \- encrypts all added files with the inner keyring\.
Expand Down Expand Up @@ -31,5 +31,8 @@ It is possible to modify the names of the encrypted files by setting \fBSECRETS_
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-hide\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-init(1), git\-secret\-tell(1), git\-secret\-add(1), git\-secret\-reveal(1)
git\-secret\-init(1) \fIhttp://git\-secret\.io/git\-secret\-init\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-add(1) \fIhttp://git\-secret\.io/git\-secret\-add\fR, git\-secret\-reveal(1) \fIhttp://git\-secret\.io/git\-secret\-reveal\fR
7 changes: 6 additions & 1 deletion man/man1/git-secret-hide.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ It is possible to modify the names of the encrypted files by setting `SECRETS_EX
-h - shows help.


## MANUAL

Run `man git-secret-hide` to see this note.


## SEE ALSO

git-secret-init(1), git-secret-tell(1), git-secret-add(1), git-secret-reveal(1)
[git-secret-init(1)](http://git-secret.io/git-secret-init), [git-secret-tell(1)](http://git-secret.io/git-secret-tell), [git-secret-add(1)](http://git-secret.io/git-secret-add), [git-secret-reveal(1)](http://git-secret.io/git-secret-reveal)
7 changes: 5 additions & 2 deletions man/man1/git-secret-init.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http:/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-INIT" "1" "March 2016" "" ""
.TH "GIT\-SECRET\-INIT" "1" "February 2017" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-init\fR \- initializes git\-secret repository\.
Expand All @@ -25,5 +25,8 @@ git secret init
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-init\fR to see this note\.
.
.SH "SEE ALSO"
git\-init(1), git\-secret\-tell(1)
git\-secret\-usage(1) \fIhttp://git\-secret\.io/git\-secret\-usage\fR, git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR
7 changes: 6 additions & 1 deletion man/man1/git-secret-init.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ git-secret-init - initializes git-secret repository.
-h - shows this help.


## MANUAL

Run `man git-secret-init` to see this note.


## SEE ALSO

git-init(1), git-secret-tell(1)
[git-secret-usage(1)](http://git-secret.io/git-secret-usage), [git-secret-tell(1)](http://git-secret.io/git-secret-tell)
11 changes: 7 additions & 4 deletions man/man1/git-secret-killperson.1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http:/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SECRET\-KILLPERSON" "1" "February 2016" "" ""
.TH "GIT\-SECRET\-KILLPERSON" "1" "February 2017" "sobolevn" "git-secret"
.
.SH "NAME"
\fBgit\-secret\-killperson\fR \- deletes key identified by an email from the inner keyring\.
Expand All @@ -10,12 +10,12 @@
.
.nf

git secret killperson [email]
git secret killperson <emails>\.\.\.
.
.fi
.
.SH "DESCRIPTION"
\fBgit\-secret\-killperson\fR makes it impossible for given user to decrypt the hidden file in the future\. It is required to run \fBgit\-secret\-hide\fR once again with the updated keyring\.
This command removes selected email addresses from the keyring\. \fBgit\-secret\-killperson\fR makes it impossible for given users to decrypt the hidden files in the future\. It is required to run \fBgit\-secret\-hide\fR once again with the updated keyring to renew the encryption\.
.
.SH "OPTIONS"
.
Expand All @@ -25,5 +25,8 @@ git secret killperson [email]
.
.fi
.
.SH "MANUAL"
Run \fBman git\-secret\-killperson\fR to see this note\.
.
.SH "SEE ALSO"
git\-secret\-tell(1), git\-secret\-hide(1), git\-secret\-reveal(1)
git\-secret\-tell(1) \fIhttp://git\-secret\.io/git\-secret\-tell\fR, git\-secret\-remove(1) \fIhttp://git\-secret\.io/git\-secret\-remove\fR, git\-secret\-clean(1) \fIhttp://git\-secret\.io/git\-secret\-clean\fR
Loading

0 comments on commit 8e39cdc

Please sign in to comment.