release stage: Fix dirty repository checking