simplesurance / baur

An incremental task runner for mono repositories.
GNU General Public License v2.0
360 stars 11 forks source link

inputs: track executable permission of file owner on unix #522

Closed fho closed 8 months ago

fho commented 8 months ago

On Unix systems baur now tracks the executable owner bit of files. This enables that tasks are rerun if the executable owner bit changes.

The normal use case is to clone a git repository in CI and then run baur. Git only tracks the executable owner bit, other permission changes are not stored and applied. Therefore baur also only tracks the same information.

If the file is a tracked, unmodified git object the permission mode is taken from git otherwise stat/lstat are called to obtain them after input file discovery.

On non Unix systems the information if a file is executable is not tracked. It's not easily obtainable via the Golang stdlib.