Tuesday 7 November 2023

gitlab ci and git submoudule

gitlab ci で、submodule として使ってるもの(例えば、hugo theme とか)が古いのを参照してしまうのではまって。

 diff -r ie-hugo/.git/modules/themes/ie-hugo-theme/FETCH_HEAD ie-hugo-bad/.git/modules/themes/ie-hugo-theme/FETCH_HEAD
 1c1
 < 87f2c9104beede26b830162de860ffa99085d3bb branch 'main' of gitlab.ie.u-ryukyu.ac.jp:ie-syskan/ie-hugo-theme
 ---
 > 0f21c8e7c80a63256094e41f4e07572945a94cb8 not-for-merge branch 'main' of https://gitlab.ie.u-ryukyu.ac.jp/ie-syskan/ie-hugo-theme
 diff -r ie-hugo/.git/modules/themes/ie-hugo-theme/HEAD ie-hugo-bad/.git/modules/themes/ie-hugo-theme/HEAD
 1c1
 < 87f2c9104beede26b830162de860ffa99085d3bb
 ---
 > 273a8492477c556f070431440289596ea7cc4fb3

あたりで、おかしくなる。

 git submodule sync
 git submodule update --init --recursive
 git commit -a
 git push

あたりでいいはずなんだが、どうも、前のを gitlab-runner が覚えているらしく...

いや、submodule で、こういうの覚えるのどうなのかなぁ。気持ちはわかんなくはないが、固定したいなら、むしろ指定するとかの方が。

まぁ、しばらく格闘したらなおったわけですが。たぶん、なんか間違ったコマンド打ったな。

No comments: