Closed WXbet closed 2 months ago
Whatever offset we use won't work. The offset is relative to the commits made in gitlab and should be changed every time we merge from gitlab. And of course it has to remain the same when we do emu only commits.
Can't think of an idea right now....
Do you have an idea how to manage this? Short resolution is to change the offset here + 2 (and increment it with every additional commit in oscam-patched that oscam official does not have)
How to count commits? How to change the offset? With an additional commit? It becomes much complicated....
I know, we need a resolution in gitlab. So long we can use this here in oscam-patched's config.sh:
'-r'|'--oscam-revision')
offset=1103 #difference between last svn revision number and git commit count (without merge commits) + 1
emucommits=2 #count of emu commit that are not exists in offical oscam repository
revision=`git rev-list --no-merges --count HEAD`
emuversion=`grep EMU_VERSION module-emulator-osemu.h | awk '{ print $3 }'`
echo $(($offset + $revision - $emucommits))-$emuversion
break
Variable emucommits
has to be incremented with every emu special commit. That's it. When this change will be committed the variable emucommits
must be set to 3.
That's what I mean... So we need to change two "versions" now? emucommits and emu version... Let alone if we make a commit to the workflow files, we need to change the code in oscam? Doesn't make sense...
Yep, you are right. That's ugly.
It needs some thinking...
I'm tending to use tags in official git. I think we can automated this on worklow/pipeline on master to tag each commit automatically. config.sh the get the correkt revision information from git tag, thats it. No file hassels...
That would be great! This means create a tag for every commit, right?
Yes, right. In this way: https://docs.gitlab.com/ee/api/tags.html
@nautilus7: The offset variable has to be removed here: https://github.com/oscam-emu/oscam-patched/blob/master/config.sh#L721
fixed with 7c3b3357ece53624a64318f25a879431eb68060a and 8a3c2de963ddaac690fec766919a14c5b566b500
Hi @nautilus7, at this time we have (as workaroud) a virtual revison number counting in oscam official. See: https://github.com/oscam-emu/oscam-patched/blob/master/config.sh#L713-L718 This breaks now, because oscam-patched does not have the same commit count as the orginal repo.
Do you have an idea how to manage this? Short resolution is to change the offset here + 2 (and increment it with every additional commit in oscam-patched that oscam official does not have)
But the main issue came from oscam official. There we have no pipeline setup until now to use another revision number generation approach. Maybe we should create an issue in gitlab and discuss the oscam way there...