Skip to content

Commit

Permalink
trying to get artifacts with correct name
Browse files Browse the repository at this point in the history
  • Loading branch information
dkeeney committed Aug 17, 2019
1 parent 0167fcd commit 6a4d991
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 13 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ virtualenv:

# Successful merge/builds of the master are archived and released to pypi.
before_deploy:
- cd $TRAVIS_BUILD_DIR/build/scripts
- python $TRAVIS_BUILD_DIR/setup.py bdist_wheel
- echo "Generating binary release:"
- echo " Build the Wheel
- cd $TRAVIS_BUILD_DIR/
- python ./setup.py bdist_wheel
- cd $TRAVIS_BUILD_DIR/build/scripts
- echo " Build the GitHub Package"
- make package
- ../../ci/fetch-artifacts.sh

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
v2.0.5
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ after_build:
test: off

artifacts:
# Non-recursive search in build folder for Wheels
# Non-recursive search in build folder for github packages
- path: 'build\scripts\*.zip'
name: htm.core

# NOTE: This is turned off and will likely be removed once deployments of
# releases are controlled from a central authority. -- Matt
Expand Down
14 changes: 12 additions & 2 deletions ci/fetch-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# script to fetch artifacts from Win,OSX CI to Travis,
# where all 3 files are deployed to GitHub for release.
# curent pwd should be build/scripts


echo "Released version: "
cat ../../VERSION
echo

WINDOWS_ARTIFACT_URL="https://ci.appveyor.com/api/buildjobs/by4cpqmul79tp9ag/artifacts/build/scripts/htm_core-6866bd13ece35608313709e82c29b2260ee7be73-windows64.zip" #FIXME make the URLs automated, needs API?
OSX_ARTIFACT_URL="https://3238-118031881-gh.circle-artifacts.com/0/tmp/uploads/htm_core-7b7b53c798b3795088ce772e96c6994068fc1302-darwin64.tar.gz"
Expand Down Expand Up @@ -38,12 +44,16 @@ for i in `seq 10`; do
fi
done


# extract the wheel files for deploying to PYPI
mkdir artifacts
unzip *.zip -d artifacts
cd artifacts
tar -xf ../*.gz
unzip ../*windows64.zip
tar -xvf ../*linux64.tar.gz
tar -xvf ../*darwin64.tar.gz
cp */py/*.whl ..
cd ..
echo "wheels ready for deployment"
ls *.whl
#rm -r artifacts

3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,10 @@ install(DIRECTORY "${CMAKE_INSTALL_PREFIX}/distr/dist/"
############### PACKAGE ###########################
#
# `make package` results in
# htm_cpp-${HTM_CORE_VERSION}-${PLATFORM}${BITNESS}${PLATFORM_SUFFIX}.tar.gz binary release
# htm_cpp-${VERSION}-${PLATFORM}${BITNESS}${PLATFORM_SUFFIX}.tar.gz binary release
#
# TODO: The version numbers need to be automatically incremented.
message(STATUS "Packaging version: ${VERSION} in CPACK")
set(CPACK_PACKAGE_NAME "htm.core")
set(CPACK_PACKAGE_VENDOR "https://github.com/htm-community/htm.core")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "htm.core - Community implementation of Numenta's algorthms.")
Expand Down
24 changes: 18 additions & 6 deletions versioning.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ function(get_versions version major minor patch)
if ("${GIT_REV}" STREQUAL "")
# use the version already in the VERSION file.
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION)
message(STATUS "NOTE: USING version from VERSION file. No git.")
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION GIT_TAG)
endif()
else()

# see if there as a tag set on this PR
# see if there as a tag set on this branch
execute_process(
COMMAND "${GIT_EXECUTABLE}" describe --exact-match --tags
OUTPUT_VARIABLE GIT_TAG
Expand All @@ -75,20 +76,31 @@ function(get_versions version major minor patch)
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
endif()

if ("${GIT_TAG}" STREQUAL "")
# use the version already in the VERSION file.
# This could happen if not enough of the repository is downloaded.
# i.e. use "git fetch --depth=200"
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION)
message(STATUS "NOTE: USING version from VERSION file. No git.")
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION GIT_TAG)
endif()
endif()
endif()

if ("${GIT_TAG}" STREQUAL "")
# even the VERSION file must have been empty...should not happen.
set(m_version ${GIT_REV})
set(${version} ${m_version} PARENT_SCOPE)
set(${major} 0 PARENT_SCOPE)
set(${minor} 0 PARENT_SCOPE)
set(${patch} 0 PARENT_SCOPE)
return()
else()
set(m_version ${GIT_TAG})
endif()

message(STATUS "Version from Git: ${m_version}")
set(m_version ${GIT_TAG})

message(STATUS "Full Version from Git: ${m_version}")

string(REGEX REPLACE "^([vV])([0-9]*)([.][0-9]*[.][0-9]*-?.*)$" "\\2" numbers ${m_version} )
set(m_major ${numbers})
Expand All @@ -97,8 +109,8 @@ function(get_versions version major minor patch)
string(REGEX REPLACE "^([vV][0-9]*[.][0-9]*[.])([0-9]*)(-?.*)$" "\\2" numbers ${m_version} )
set(m_patch ${numbers})

# limiting ourselves to Major.Minor.Patch format for version.
set(m_version "${m_major}.${m_minor}.${m_patch}")
# limiting ourselves to v Major.Minor.Patch format for version.
set(m_version "v${m_major}.${m_minor}.${m_patch}")

# Write it to the file VERSION if it is different.
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION)
Expand Down

0 comments on commit 6a4d991

Please sign in to comment.