mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-28 23:32:00 +08:00
#4635 Move source dir determinator into common utilties.
This commit is contained in:
parent
63c7d68140
commit
ed45c01420
@ -1,5 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
function set_source_dir ()
|
||||||
|
{
|
||||||
|
if [[ -z ${TRAVIS_BUILD_DIR+x} ]]; then
|
||||||
|
if [[ ! -z ${1+x} ]]; then
|
||||||
|
SLIC3R_DIR=$1
|
||||||
|
echo "Using SLIC3R_DIR = $1"
|
||||||
|
else
|
||||||
|
SLIC3R_DIR=$(pwd)
|
||||||
|
echo "Using current directory as source dir"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
SLIC3R_DIR="$TRAVIS_BUILD_DIR"
|
||||||
|
echo "Using Travis build dir"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# must be run from the root
|
# must be run from the root
|
||||||
function set_version ()
|
function set_version ()
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
source $(dirname $0)/../common/util.sh
|
source $(dirname $0)/../common/util.sh
|
||||||
|
|
||||||
|
set_source_dir $2
|
||||||
set_version
|
set_version
|
||||||
get_commit
|
get_commit
|
||||||
set_build_id
|
set_build_id
|
||||||
|
@ -17,6 +17,7 @@ source $(dirname $0)/../common/util.sh
|
|||||||
# Determine if this is a tagged (release) commit.
|
# Determine if this is a tagged (release) commit.
|
||||||
# Change the build id accordingly.
|
# Change the build id accordingly.
|
||||||
|
|
||||||
|
set_source_dir $2
|
||||||
set_version
|
set_version
|
||||||
get_commit
|
get_commit
|
||||||
set_build_id
|
set_build_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user