Browse Source

ENGINE-883: script updates from hooks directory, Makefile fix for those who haven't put hooks in. Needs to be tested on other systems and won't save non-hooks-using windows users from themselves.

2.1_audit_refresh
Krista Bennett 1 year ago
parent
commit
db98c3ac7a
7 changed files with 25 additions and 4 deletions
  1. +4
    -0
      .gitignore
  2. +1
    -1
      scripts/git/post-checkout
  3. +1
    -1
      scripts/git/post-commit
  4. +1
    -1
      scripts/git/post-merge-commit
  5. +4
    -0
      src/Makefile
  6. +13
    -0
      src/pEp_internal.h
  7. +1
    -1
      templates/commit_hash.h

+ 4
- 0
.gitignore View File

@ -89,6 +89,10 @@ test/googletest
test/tmp/*
src/commit_hash.h
.idea/
venv/
venv2/
cleangit.py
# ignore generated test data


+ 1
- 1
scripts/git/post-checkout View File

@ -2,5 +2,5 @@
# Commit hash header file - if we don't run this, it won't build.
commit_hash="$(git rev-parse HEAD)"
sed "s/\(PEP_CURRENT_COMMIT_HASH=\).*/\1\"$commit_hash\"/" templates/commit_hash.h > src/commit_hash.h
sed "s/\(PEP_CURRENT_COMMIT_HASH\ =\).*/\1\"$commit_hash\"/" templates/commit_hash.h > src/commit_hash.h

+ 1
- 1
scripts/git/post-commit View File

@ -2,5 +2,5 @@
# Commit hash header file - if we don't run this, it won't build.
commit_hash="$(git rev-parse HEAD)"
sed "s/\(PEP_CURRENT_COMMIT_HASH=\).*/\1\"$commit_hash\"/" templates/commit_hash.h > src/commit_hash.h
sed "s/\(PEP_CURRENT_COMMIT_HASH\ =\).*/\1\"$commit_hash\"/" templates/commit_hash.h > src/commit_hash.h

+ 1
- 1
scripts/git/post-merge-commit View File

@ -2,5 +2,5 @@
# Commit hash header file - if we don't run this, it won't build.
commit_hash="$(git rev-parse HEAD)"
sed "s/\(PEP_CURRENT_COMMIT_HASH=\).*/\1\"$commit_hash\"/" templates/commit_hash.h > src/commit_hash.h
sed "s/\(PEP_CURRENT_COMMIT_HASH\ =\).*/\1\"$commit_hash\"/" templates/commit_hash.h > src/commit_hash.h

+ 4
- 0
src/Makefile View File

@ -43,6 +43,10 @@ else
$(error I do not know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif
ifeq (,$(wildcard commit_hash.h))
$(shell cp ../templates/commit_hash.h ./commit_hash.h)
endif
ifdef SQLITE3_FROM_OS
NO_SOURCE+= sqlite3.c
CFLAGS+= -DSQLITE3_FROM_OS


+ 13
- 0
src/pEp_internal.h View File

@ -7,6 +7,19 @@
#ifndef PEP_INTERNAL_H
#define PEP_INTERNAL_H
#if defined __has_include
# if __has_include ("commit_hash.h")
# include "commit_hash.h"
# else
# define PEP_CURRENT_COMMIT_HASH="DUMMY_COMMIT_HASH_ERROR"
# endif
#else
// Well, we tried. Better hope the git setup is correct.
// IF NOT, or you aren't using git, please copy the commit_hash.h file from
// templates/ into src/ if this include fails.
# include "commit_hash.h"
#endif
#include "commit_hash.h" // We need this everywhere. So.
// maximum attachment size to import as key 25MB, maximum of 20 attachments


+ 1
- 1
templates/commit_hash.h View File

@ -1,7 +1,7 @@
#ifndef COMMIT_HASH_H
#define COMMIT_HASH_H
#define PEP_CURRENT_COMMIT_HASH="EMPTY_DUMMY_COMMIT_HASH_ERROR"
#define PEP_CURRENT_COMMIT_HASH = "DUMMY_COMMIT_HASH_ERROR"
#endif

Loading…
Cancel
Save