Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Fix sed checks for CLI versioning (#3486)
Browse files Browse the repository at this point in the history
* Fix sed checks for CLI versioning

* Fix.

* Fix.

* Changing build_cli

* Trying greater than

* Tring once more.

* Trying major minor

* trying to replace major minor

* Using major minor
  • Loading branch information
nharper285 authored Sep 7, 2023
1 parent d2d57a8 commit 830b479
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/ci/set-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ GET_VERSION=${SCRIPT_DIR}/get-version.sh
VERSION=${1:-$(${GET_VERSION})}
cd ${SCRIPT_DIR}/../../

arrVer=(${VERSION//./ })
MAJOR=${arrVer[0]}
MINOR=${arrVer[1]}

SET_VERSIONS="src/pytypes/onefuzztypes/__version__.py src/cli/onefuzz/__version__.py"
SET_REQS="src/cli/requirements.txt"

sed -i "s/0.0.0/${VERSION}/" ${SET_VERSIONS}
sed -i "s/onefuzztypes~=0.0.0/onefuzztypes==${VERSION}/" ${SET_REQS}
sed -i "s/onefuzztypes==0.0.0/onefuzztypes==${MAJOR}.${MINOR}.*/" ${SET_REQS}
2 changes: 1 addition & 1 deletion src/ci/unset-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ SET_VERSIONS="src/pytypes/onefuzztypes/__version__.py src/cli/onefuzz/__version_
SET_REQS="src/cli/requirements.txt"

sed -i 's/__version__ = .*/__version__ = "0.0.0"/' ${SET_VERSIONS}
sed -i "s/onefuzztypes==.*/onefuzztypes~=0.0.0/" ${SET_REQS}
sed -i "s/onefuzztypes==.*/onefuzztypes==0.0.0/" ${SET_REQS}
2 changes: 1 addition & 1 deletion src/cli/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ opentelemetry-instrumentation-requests==0.37b0
# install rsa version >=4.7 to fix CVE-2020-25658
rsa>=4.7
# onefuzztypes version is set during build
onefuzztypes~=0.0.0
onefuzztypes==0.0.0

0 comments on commit 830b479

Please sign in to comment.