-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
The document describes revision field in the scm-source.json as follows:
The SCM revision, e.g. the full git commit sha1. The revision should end with the marker text ” (locally modified)” for unclean working directories. This marker text ensures that no exact match for such revisions can be found in the remote SCM repository.
but the example implementation in bash adds suffix (locally midified) to the status field, not revision:
#!/bin/bash
REV=$(git rev-parse HEAD)
URL=$(git config --get remote.origin.url)
STATUS=$(git status --porcelain)
if [ -n "$STATUS" ]; then
REV="$REV (locally modified)"
fi
# finally write hand-crafted JSON to scm-source.json
echo '{"url": "git:'$URL'", "revision": "'$REV'", "author": "'$USER'", "status": "'$STATUS'"}' > scm-source.jsonMetadata
Metadata
Assignees
Labels
No labels