More generic publish script - in progress