Skip to content

Commit

Permalink
all in bash
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu authored Mar 14, 2024
1 parent d7923dc commit 9f30f7c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 30 deletions.
13 changes: 0 additions & 13 deletions .github/actions/check_versions/compare_versions.sh

This file was deleted.

24 changes: 17 additions & 7 deletions .github/workflows/compare_versions.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
echo "Finding version numbers for $1"
some_failure=false

conda_version=$(conda search -c conda-forge $1 | tail -n1 | awk '{print $2}')
echo "conda version=$conda_version"
for i in "hipscat" "hipscat-import" "lsdb"
do
echo "Finding version numbers for $i"

pypi_version=$(get_pypi_latest_version $1)
echo "pypi version=$pypi_version"
conda_version=$(conda search -c conda-forge $1 | tail -n1 | awk '{print $2}')
echo "conda version=$conda_version"

if ["$conda_version" != "$pypi_version"]
then
pypi_version=$(get_pypi_latest_version $1)
echo "pypi version=$pypi_version"

if ["$conda_version" != "$pypi_version"]
then
some_failure=true
fi
done

if ["$some_failure" == true]
then
exit 1
fi
12 changes: 2 additions & 10 deletions .github/workflows/version_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,5 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install get_pypi_latest_version
- name: hipscat version check
run: bash ${GITHUB_WORKSPACE}/.github/workflows/compare_versions.sh hipscat
- name: hipscat-import version check
uses: ./.github/actions/check_versions
with:
package-name: hipscat-import
- name: lsdb version check
uses: ./.github/actions/check_versions
with:
package-name: lsdb
- name: Version check script
run: bash ${GITHUB_WORKSPACE}/.github/workflows/compare_versions.sh

0 comments on commit 9f30f7c

Please sign in to comment.