mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
17 lines
616 B
Bash
17 lines
616 B
Bash
#!/bin/sh
|
|
VCMI_PACKAGE_FILE_NAME="${TRAVIS_JOB_ID}-vcmi"
|
|
VCMI_PACKAGE_NAME_SUFFIX=""
|
|
if [ "$TRAVIS_PULL_REQUEST" = "false" ];
|
|
then
|
|
branch_name=$(echo "$TRAVIS_BRANCH" | sed 's/[^[:alnum:]]\+/_/g')
|
|
VCMI_PACKAGE_FILE_NAME="${VCMI_PACKAGE_FILE_NAME}-branch-${branch_name}-${TRAVIS_COMMIT}"
|
|
VCMI_PACKAGE_NAME_SUFFIX="branch ${branch_name}"
|
|
else
|
|
VCMI_PACKAGE_FILE_NAME="${VCMI_PACKAGE_FILE_NAME}-PR-${TRAVIS_PULL_REQUEST}-${TRAVIS_COMMIT}"
|
|
VCMI_PACKAGE_NAME_SUFFIX="PR ${TRAVIS_PULL_REQUEST}"
|
|
fi
|
|
VCMI_PACKAGE_NAME_SUFFIX="(${VCMI_PACKAGE_NAME_SUFFIX})"
|
|
|
|
export VCMI_PACKAGE_FILE_NAME
|
|
export VCMI_PACKAGE_NAME_SUFFIX
|