#!/bin/sh

# Script used to create a list of folders that have changes in
# them compared to a base.
#
# If on `master` branch then the latest tag is the base.
# If on another branch then `master` branch is the base.
#
# Used by `azure-pipelines.yml`.

if [ $(git branch --show-current) == "master" ]; then
    BASE=$(git describe --tags --abbrev=0)
else
    BASE="master"
fi
echo "Comparing against: $BASE"

CHANGED=""
for FOLDER in cli desktop docker help node rust; do
    git diff --quiet HEAD $BASE -- $FOLDER
    if [ $? -eq 1 ]; then
        CHANGED="$CHANGED$FOLDER,"
    fi
done

echo "Folders with changes: $CHANGED"
echo "##vso[task.setvariable variable=changed;isOutput=true]$CHANGED"

#!/bin/sh

# Script used to create a list of folders that have changes in
# them compared to a base.
#
# If on `master` branch then the latest tag is the base.
# If on another branch then `master` branch is the base.
#
# Used by `azure-pipelines.yml`.

if [[ $(git branch --show-current) == "master" ]]; then
    BASE=$(git describe --tags --abbrev=0)
else
    BASE=$(git rev-parse master)
fi
echo "Comparing against: $BASE"

CHANGED=""
for FOLDER in cli desktop docker help node rust; do
    git diff --quiet HEAD $BASE -- $FOLDER
    if [ $? -eq 1 ]; then
        CHANGED="$CHANGED$FOLDER,"
    fi
done

echo "Folders with changes: $CHANGED"
echo "##vso[task.setvariable variable=changed;isOutput=true]$CHANGED"

Fix syuntax and get commit of master
ci(Changes): Fix syuntax and get commit of master