Merge pull request #25 from krallin/specific-git-dir

Build: ensure the correct git directory is used
pull/26/head
Thomas Orozco 9 years ago
commit dc261b386e
  1. 4
      .travis.yml
  2. 6
      CMakeLists.txt
  3. 2
      README.md

@ -35,8 +35,8 @@ deploy:
file:
- "./dist/tini"
- "./dist/tini-static"
- "./dist/tini_0.8.3.deb"
- "./dist/tini_0.8.3.rpm"
- "./dist/tini_0.8.4.deb"
- "./dist/tini_0.8.4.rpm"
on:
repo: krallin/tini
tags: true

@ -4,18 +4,18 @@ project (tini C)
# Config
set (tini_VERSION_MAJOR 0)
set (tini_VERSION_MINOR 8)
set (tini_VERSION_PATCH 3)
set (tini_VERSION_PATCH 4)
# Extract git version and dirty-ness
execute_process (
COMMAND git log -n 1 --date=local --pretty=format:%h
COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" log -n 1 --date=local --pretty=format:%h
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
RESULT_VARIABLE git_version_check_ret
OUTPUT_VARIABLE tini_VERSION_GIT
)
execute_process(
COMMAND git status --porcelain --untracked-files=no
COMMAND git --git-dir "${PROJECT_SOURCE_DIR}/.git" --work-tree "${PROJECT_SOURCE_DIR}" status --porcelain --untracked-files=no
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE git_dirty_check_out
)

@ -37,7 +37,7 @@ In Docker, you will want to use an entrypoint so you don't have to remember
to manually invoke Tini:
# Add Tini
ENV TINI_VERSION v0.8.3
ENV TINI_VERSION v0.8.4
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

Loading…
Cancel
Save