mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 02:05:59 +01:00
hyprpm: shallow since a week before commit date
timezones, etc. ref #5612
This commit is contained in:
parent
32555e98dd
commit
9a66514e26
1 changed files with 8 additions and 1 deletions
|
@ -401,7 +401,14 @@ bool CPluginManager::updateHeaders(bool force) {
|
||||||
|
|
||||||
progress.printMessageAbove(std::string{Colors::YELLOW} + "!" + Colors::RESET + " Cloning https://github.com/hyprwm/hyprland, this might take a moment.");
|
progress.printMessageAbove(std::string{Colors::YELLOW} + "!" + Colors::RESET + " Cloning https://github.com/hyprwm/hyprland, this might take a moment.");
|
||||||
|
|
||||||
std::string ret = execAndGet("cd /tmp/hyprpm && git clone --recursive https://github.com/hyprwm/hyprland hyprland --shallow-since='" + HLVER.date + "'");
|
// let us give a bit of leg-room for shallowing
|
||||||
|
// due to timezones, etc.
|
||||||
|
const std::string SHALLOW_DATE = removeBeginEndSpacesTabs(HLVER.date).empty() ? "" : execAndGet("date --date='" + HLVER.date + " - 1 weeks' '+\%a \%b \%d \%H:\%M:\%S \%Y'");
|
||||||
|
|
||||||
|
if (m_bVerbose)
|
||||||
|
progress.printMessageAbove(std::string{Colors::BLUE} + "[v] " + Colors::RESET + "will shallow since: " + SHALLOW_DATE);
|
||||||
|
|
||||||
|
std::string ret = execAndGet("cd /tmp/hyprpm && git clone --recursive https://github.com/hyprwm/hyprland hyprland --shallow-since='" + SHALLOW_DATE + "'");
|
||||||
|
|
||||||
if (!std::filesystem::exists("/tmp/hyprpm/hyprland")) {
|
if (!std::filesystem::exists("/tmp/hyprpm/hyprland")) {
|
||||||
progress.printMessageAbove(std::string{Colors::RED} + "✖" + Colors::RESET + " Clone failed. Retrying without shallow.");
|
progress.printMessageAbove(std::string{Colors::RED} + "✖" + Colors::RESET + " Clone failed. Retrying without shallow.");
|
||||||
|
|
Loading…
Reference in a new issue