added make distribution, updated travis and docker files

This commit is contained in:
sobolevn 2016-07-02 12:32:07 +03:00
parent 26448c9474
commit f5e40fefe0
No known key found for this signature in database
GPG Key ID: FF672D568AE3C73E
4 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,22 @@
FROM debian:latest
MAINTAINER Nikita Sobolev (mail@sobolevn.me)
# Dependencies and project initialization:
RUN apt-get update && \
apt-get install -y man make git apt-transport-https && \
apt-get autoremove && apt-get autoclean
# 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:
RUN git clone -q https://github.com/sobolevn/git-secret.git && \
cd git-secret && git remote rm origin
WORKDIR /code/git-secret

View File

@ -1,6 +1,11 @@
matrix:
fast_finish: true
include:
- os: linux
env: GITSECRET_DIST="make"; DOCKER_DIST="debian"
services: docker
sudo: required
language: ruby
- os: linux
env: GITSECRET_DIST="deb"; DOCKER_DIST="debian";
services: docker

View File

@ -127,3 +127,11 @@ deploy-rpm: build-rpm
@chmod +x "./utils/rpm/rpm-deploy.sh"; sync; \
export SECRET_PROJECT_ROOT="${PWD}"; \
"./utils/rpm/rpm-deploy.sh"
# make:
.PHONY: test-make-ci
test-make-ci: clean install-test
@chmod +x "./utils/make/make-ci.sh"; sync; \
export SECRET_PROJECT_ROOT="${PWD}"; \
"./utils/make/make-ci.sh"

31
utils/make/make-ci.sh Normal file
View File

@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -e
# Note that this file is created for test purposes:
# 1. It runs inside the Docker container
# 2. It does not use `sudo` or anything
# 3. If you would like to install a package with `make` on your system,
# see `Installation`
source "${SECRET_PROJECT_ROOT}/utils/build-utils.sh"
# Integration tests
function integration_tests {
# Installing the package:
make build
make install
# Testing the installation:
which "git-secret"
# Test the manuals:
man --where "git-secret" # .7
man --where "git-secret-init" # .1
}
integration_tests
# Unit tests:
source "${SECRET_PROJECT_ROOT}/utils/tests.sh"