forked from microsoft/onefuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set more detailed version information during builds (microsoft#58)
- Loading branch information
1 parent
71dd2f4
commit ea21e45
Showing
8 changed files
with
165 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
set -e | ||
|
||
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) | ||
BASE_VERSION=$(cat ${SCRIPT_DIR}/../../CURRENT_VERSION) | ||
BRANCH=$(git rev-parse --abbrev-ref HEAD) | ||
GIT_HASH=$(git rev-parse HEAD) | ||
|
||
if [ "${GITHUB_REF}" != "" ]; then | ||
TAG_VERSION=${GITHUB_REF#refs/tags/} | ||
|
||
# this isn't a tag | ||
if [ ${TAG_VERSION} == ${GITHUB_REF} ]; then | ||
echo ${BASE_VERSION}-${GIT_HASH} | ||
else | ||
echo ${BASE_VERSION} | ||
fi | ||
else | ||
if $(git diff --quiet); then | ||
echo ${BASE_VERSION}-${GIT_HASH} | ||
else | ||
echo ${BASE_VERSION}-${GIT_HASH}.localchanges | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
set -ex | ||
|
||
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) | ||
GET_VERSION=${SCRIPT_DIR}/get-version.sh | ||
VERSION=$(${GET_VERSION}) | ||
cd ${SCRIPT_DIR}/../../ | ||
|
||
SET_VERSIONS="src/pytypes/onefuzztypes/__version__.py src/api-service/__app__/onefuzzlib/__version__.py src/cli/onefuzz/__version__.py" | ||
SET_REQS="src/cli/requirements.txt src/api-service/__app__/requirements.txt" | ||
|
||
sed -i 's/__version__ = .*/__version__ = "0.0.0"/' ${SET_VERSIONS} | ||
sed -i "s/onefuzztypes==.*/onefuzztypes==0.0.0/" ${SET_REQS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters