Skip to content

Instantly share code, notes, and snippets.

@mauritsvanrees
Last active November 2, 2018 11:01
Show Gist options
  • Save mauritsvanrees/eb69adbb51747834808f6847c140b706 to your computer and use it in GitHub Desktop.
Save mauritsvanrees/eb69adbb51747834808f6847c140b706 to your computer and use it in GitHub Desktop.
Run a few checks in a Plone package checkout before creating a release. Hardcoded to my system.
#!/bin/sh
# Latest version:
# https://gist.github.com/mauritsvanrees/eb69adbb51747834808f6847c140b706
# Run this in a checkout of a Plone package to get some information,
# like which version is used in which Plone version.
# Hardly related note: sort coredev checkouts by date that they were added:
# git blame checkouts.cfg | cut -b29- | sort -g
# The current directory as package name.
package=$(basename $(pwd))
echo "Checking $package"
# Checkouts of branches of git@github.com:plone/buildout.coredev are here:
dir4="/Users/maurits/community/plone-coredev/4.3"
dir50="/Users/maurits/community/plone-coredev/5.0"
dir51="/Users/maurits/community/plone-coredev/5.1"
dir52="/Users/maurits/community/plone-coredev/5.2"
# Directory with versions.cfg files for all Plone versions, created with
# https://gist.github.com/mauritsvanrees/99cb4a25b622479e7dc3
versions="/Users/maurits/community/plone-coredev/versions"
echo "### PLONE VERSIONS ########################"
grep "$package " $versions/*cfg
echo "### PLONE 4.3 coredev #####################"
# Try not to match plone.app.contentmenu for plone.app.content. Not
# easily doable in checkouts.cfg, as the name is on the end of the
# line.
echo "checkouts.cfg:"
grep "$package" $dir4/checkouts.cfg
echo "sources.cfg:"
grep "$package " $dir4/sources.cfg
echo "versions.cfg:"
grep "$package " $dir4/versions.cfg
echo "### PLONE 5.0 coredev #####################"
echo "checkouts.cfg:"
grep "$package" $dir50/checkouts.cfg
echo "sources.cfg:"
grep "$package " $dir50/sources.cfg
echo "versions.cfg:"
grep "$package " $dir50/versions.cfg
echo "### PLONE 5.1 coredev #####################"
echo "checkouts.cfg:"
grep "$package" $dir51/checkouts.cfg
echo "sources.cfg:"
grep "$package " $dir51/sources.cfg
echo "versions.cfg:"
grep "$package " $dir51/versions.cfg
echo "### PLONE 5.2 coredev #####################"
echo "checkouts.cfg:"
grep "$package" $dir52/checkouts.cfg
echo "sources.cfg:"
grep "$package " $dir52/sources.cfg
echo "versions.cfg:"
grep "$package " $dir52/versions.cfg
echo "### git pull ######################"
git pull
echo "### setup.py ######################"
grep "Framework :: Plone" setup.py
grep "Programming Language :: Python" setup.py
echo "### Continue?"
read
echo "### git status ######################"
git status
echo "### pyroma ######################"
pyroma .
echo "### check-manifest ######################"
check-manifest
echo "### Continue?"
read
echo "### git log ######################"
git log -1
if test -e CHANGES.rst; then
echo "### CHANGES.rst ######################"
head -20 CHANGES.rst
fi
echo "### Github url ######################"
git remote -v | grep github.com/ | sed "s|.*github.com/|https://github.com/|;s|\.git||;s| .*||"
echo "### create-wheel in setup.cfg? ###########"
grep create-wheel setup.cfg
echo "### universal wheel in setup.cfg? ###########"
grep -C1 bdist_wheel setup.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment