Skip to content
Snippets Groups Projects
Commit 353bfd4f authored by Levi Pfantz's avatar Levi Pfantz
Browse files

Fix versioning (hopefully for the last time) and switch from MambaForge (deprecated) to MiniForge

parent 0a1964ec
No related branches found
No related tags found
1 merge request!37Merge work from 1.1 into master
......@@ -12,8 +12,8 @@ RUN dnf -y install which git findutils xz && dnf clean all
# Download and install miniforge
# https://github.com/conda-forge/miniforge#miniforge
RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" && \
/bin/bash Mambaforge-$(uname)-$(uname -m).sh -b -p $HOME/miniforge && \
RUN curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
/bin/bash Miniforge3-$(uname)-$(uname -m).sh -b -p $HOME/miniforge && \
ln -s $HOME/miniforge/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". $HOME/miniforge/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc
......
......@@ -18,12 +18,18 @@
if [ $# -eq 1 ]; then
version=$1
unzipped_dir_version=$version
elif [ $# -eq 2 ]; then
version=$1
unzipped_dir_version=$2
else
echo "Usage: package.sh vX.Y.Z"
echo "Usage: package.sh vX.Y.Z (optionally) vA.B"
echo "X.Y.Z is the full package version while vA.B is what the directory will use for a version name when untarred."
exit 1
fi
pkg_name=cspp-geo-gridded-glm-${version}
major_minor_pkg_name=cspp-geo-gridded-glm-${unzipped_dir_version}
DIST=${DIST:-"/dock"}
GGLM_REPOS=${GGLM_REPOS:-"https://gitlab.ssec.wisc.edu/cspp_geo/cspp-geo-gridded-glm.git"}
GGLM_REF=${GGLM_REF:-"master"}
......@@ -77,6 +83,9 @@ cp $GGLM_DIR/PACKAGE_README.md ./README.md
cp $GGLM_DIR/PACKAGE_LICENSE ./LICENSE
cp $GGLM_DIR/bin/* ./bin/
cp -r $GGLM_DIR/libexec/* ./libexec/
echo "# __version__.py" > ./libexec/gridded_glm/__version__.py
echo "" >> ./libexec/gridded_glm/__version__.py
echo "__version__ = \"$version\"" >> ./libexec/gridded_glm/__version__.py
# Untar the tarball so we can put things where we want
tar -xz -C ./libexec/python_runtime -f ../${conda_tb}
# write a conda environment.yml to the python_runtime/ folder so that we can more easily audit what's included in our runtime between builds
......@@ -99,6 +108,7 @@ if [ $MINIFY_TARBALL -ne 0 ]; then
fi
# Create tarball of package directory
XZ_DEFAULTS="--threads=$(nproc)" tar -Jc --owner 0 --group 0 -f ${pkg_name}.tar.xz ${pkg_name}
mv $pkg_name $major_minor_pkg_name
XZ_DEFAULTS="--threads=$(nproc)" tar -Jc --owner 0 --group 0 -f ${pkg_name}.tar.xz ${major_minor_pkg_name}
mv ${pkg_name}.tar.xz ${DIST}/
make_dockerfile
# __version__.py
__version__ = "1.1.0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment