Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
angproj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roman Weiss
angproj
Commits
23e17ffe
Commit
23e17ffe
authored
7 years ago
by
Marcel Huber
Browse files
Options
Downloads
Patches
Plain Diff
added hooks dir for gitinfo package
parent
563d6294
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
hooks/post-checkout
+31
-0
31 additions, 0 deletions
hooks/post-checkout
hooks/post-commit
+31
-0
31 additions, 0 deletions
hooks/post-commit
hooks/post-merge
+31
-0
31 additions, 0 deletions
hooks/post-merge
with
94 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
1
View file @
23e17ffe
...
...
@@ -25,7 +25,7 @@ before_script:
# checkout again to execute custom git-hooks
-
git checkout $CI_COMMIT_SHA
-
git clean -dxf
-
( cd $JOB_DIR && 7z a ${FileOutputDir}/${CI_JOB_NAME}.zip
.
)
-
( cd $JOB_DIR && 7z a ${FileOutputDir}/${CI_JOB_NAME}.zip
*
)
-
>
for n in $(find $JOB_DIR -maxdepth $MaxDepth "(" -name $SourceFiles -o -iname README.md ")" -print ); do
echo $n;
...
...
This diff is collapsed.
Click to expand it.
hooks/post-checkout
0 → 100755
+
31
−
0
View file @
23e17ffe
#!/bin/sh
# Copyright 2015 Brent Longborough
# Part of gitinfo2 package Version 2
# Release 2.0.7 2015-11-22
# Please read gitinfo2.pdf for licencing and other details
# -----------------------------------------------------
# Post-{commit,checkout,merge} hook for the gitinfo2 package
#
# Get the first tag found in the history from the current HEAD
FIRSTTAG
=
$(
git describe
--tags
--always
--dirty
=
'-*'
2>/dev/null
)
# Get the first tag in history that looks like a Release
RELTAG
=
$(
git describe
--tags
--long
--always
--dirty
=
'-*'
--match
'*'
2>/dev/null
)
# Hoover up the metadata
git
--no-pager
log
-1
--date
=
short
--decorate
=
short
\
--pretty
=
format:
"
\u
sepackage[%
shash={%h},
lhash={%H},
authname={%an},
authemail={%ae},
authsdate={%ad},
authidate={%ai},
authudate={%at},
commname={%cn},
commemail={%ce},
commsdate={%cd},
commidate={%ci},
commudate={%ct},
refnames={%d},
firsttagdescribe={
$FIRSTTAG
},
reltag={
$RELTAG
}
]{gitexinfo}"
HEAD
>
.git/gitHeadInfo.gin
This diff is collapsed.
Click to expand it.
hooks/post-commit
0 → 100755
+
31
−
0
View file @
23e17ffe
#!/bin/sh
# Copyright 2015 Brent Longborough
# Part of gitinfo2 package Version 2
# Release 2.0.7 2015-11-22
# Please read gitinfo2.pdf for licencing and other details
# -----------------------------------------------------
# Post-{commit,checkout,merge} hook for the gitinfo2 package
#
# Get the first tag found in the history from the current HEAD
FIRSTTAG
=
$(
git describe
--tags
--always
--dirty
=
'-*'
2>/dev/null
)
# Get the first tag in history that looks like a Release
RELTAG
=
$(
git describe
--tags
--long
--always
--dirty
=
'-*'
--match
'*'
2>/dev/null
)
# Hoover up the metadata
git
--no-pager
log
-1
--date
=
short
--decorate
=
short
\
--pretty
=
format:
"
\u
sepackage[%
shash={%h},
lhash={%H},
authname={%an},
authemail={%ae},
authsdate={%ad},
authidate={%ai},
authudate={%at},
commname={%cn},
commemail={%ce},
commsdate={%cd},
commidate={%ci},
commudate={%ct},
refnames={%d},
firsttagdescribe={
$FIRSTTAG
},
reltag={
$RELTAG
}
]{gitexinfo}"
HEAD
>
.git/gitHeadInfo.gin
This diff is collapsed.
Click to expand it.
hooks/post-merge
0 → 100755
+
31
−
0
View file @
23e17ffe
#!/bin/sh
# Copyright 2015 Brent Longborough
# Part of gitinfo2 package Version 2
# Release 2.0.7 2015-11-22
# Please read gitinfo2.pdf for licencing and other details
# -----------------------------------------------------
# Post-{commit,checkout,merge} hook for the gitinfo2 package
#
# Get the first tag found in the history from the current HEAD
FIRSTTAG
=
$(
git describe
--tags
--always
--dirty
=
'-*'
2>/dev/null
)
# Get the first tag in history that looks like a Release
RELTAG
=
$(
git describe
--tags
--long
--always
--dirty
=
'-*'
--match
'*'
2>/dev/null
)
# Hoover up the metadata
git
--no-pager
log
-1
--date
=
short
--decorate
=
short
\
--pretty
=
format:
"
\u
sepackage[%
shash={%h},
lhash={%H},
authname={%an},
authemail={%ae},
authsdate={%ad},
authidate={%ai},
authudate={%at},
commname={%cn},
commemail={%ce},
commsdate={%cd},
commidate={%ci},
commudate={%ct},
refnames={%d},
firsttagdescribe={
$FIRSTTAG
},
reltag={
$RELTAG
}
]{gitexinfo}"
HEAD
>
.git/gitHeadInfo.gin
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment