I don’t know what I’m doing wrong here, as far as I know the git hook should work. I checked everything by terminal and should be working. This is the post-update script without the shell script:
!/bin/sh
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".
var1="Release-"
var1+=$(date --rfc-3339=date)
exec git tag $var1
By the way, this script is called post-update, and not post-update.sh . Also I checked the file permissions and even dare to use 777 in chmod.
After that I switch to the master branch with git checkout master, also I checked in the hooks folder that the script is there. Then I just do with sudo also:
git merge features
git push origin master
I don’t know why the hook never gets activated during the process. It supposed to be, even with making a commit it doesn’t work. I don’t know how to approach this, because I guess the lab also checks if the two branches are exactly identical. So I can’t make a new commit, the hook needs to be activated when you are merging the two branches.
Hi @sauron Thanks for the help. I think maybe there is some issue with the lab right now. I tried the info you said and it didn’t work. I’m thinking now that what I’m doing is not working because of my fault. So I will contact the kodekloud team if they can check if i’m right or not.
In your hook script I can see var1="Release-", however as per the task description it is supposed to be release- (with small r), probably that’s the issue. If you still think there is some other issue, please record your solution and share with us to review the same.
Hi,
You need modify de hooks post-update in the remote repo, usually the remote repo is in /opt/namerepo.git, the error of you talk is when you modify the clone repo, try this, it is work for me