Skip to content

Commit

Permalink
Merge pull request #1 from vendidero/v2
Browse files Browse the repository at this point in the history
v2
  • Loading branch information
dennisnissle authored Oct 29, 2019
2 parents e76062a + 93b1288 commit 0192377
Show file tree
Hide file tree
Showing 17 changed files with 1,126 additions and 573 deletions.
53 changes: 51 additions & 2 deletions assets/css/vd-admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
display: block !important;
}

.dashboard_page_vendidero .about-wrap p.submit {
.vd-wrapper .about-wrap p.submit {
float: left;
}

.dashboard_page_vendidero .about-wrap .refresh {
.vd-wrapper .about-wrap .refresh {
margin-left: 1em;
font-size: 12px;
line-height: 27px;
Expand All @@ -18,4 +18,53 @@ span.vd-inline-upgrade-expire-notice {
margin: 5px 0px !important;
border-left: 4px solid #dc3232;
padding: 1px 12px !important;
}

.vd-wrapper .error p {
line-height: 1.8;
}

.vd-wrapper .table-wrap {
max-width: 100%;
}

.vd-wrapper .column-product_status {
text-align: right;
}

.vd-wrapper .column-product_expires {
width: 15ch;
}

.vd-wrapper .column-product_name {
width: 35ch;
}

.vd-wrapper .version {
background: rgb(238, 238, 238);
padding: 0.2em 0.5em;
border-radius: 3px;
margin-right: 5px;
}

.vd-wrapper .version-old {
background: #eba3a3;
color: #761919;
}

.vd-wrapper .version-latest {
background: #c6e1c6;
color: #5b841b;
}

.vd-wrapper .column-product_version .button-secondary {
margin-top: 10px;
}

.vd-wrapper .column-product_name .active-on {
font-size: .8em;
}

.vd-wrapper .column-product_active {
width: 30ch;
}
3 changes: 0 additions & 3 deletions assets/js/vd-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jQuery( function( $ ) {
}

if ( $( 'body' ).hasClass( 'update-core-php' ) ) {

$( '.vd-upgrade-notice' ).each( function() {

var text = $( this ).html();
Expand All @@ -24,7 +23,5 @@ jQuery( function( $ ) {
}

});

}

});
105 changes: 105 additions & 0 deletions bin/github-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#!/bin/sh

RELEASER_PATH=$(pwd)
PLUGIN_SLUG="vendidero-helper"
GITHUB_ORG="vendidero"
IS_PRE_RELEASE=false

# Functions
# Check if string contains substring
is_substring() {
case "$2" in
*$1*)
return 0
;;
*)
return 1
;;
esac
}

# Output colorized strings
#
# Color codes:
# 0 - black
# 1 - red
# 2 - green
# 3 - yellow
# 4 - blue
# 5 - magenta
# 6 - cian
# 7 - white
output() {
echo "$(tput setaf "$1")$2$(tput sgr0)"
}

if ! [ -x "$(command -v hub)" ]; then
echo 'Error: hub is not installed. Install from https://github.com/github/hub' >&2
exit 1
fi

# Release script
echo
output 5 "Vendidero Helper->GitHub RELEASE SCRIPT"
output 5 "============================="
echo
printf "This script will build files and create a tag on GitHub based on your local branch."
echo
echo "Before proceeding:"
echo " • Ensure you have checked out the branch you wish to release"
echo " • Ensure you have committed/pushed all local changes"
echo " • Did you remember to update versions, changelogs, and stable tags in the readme and plugin files?"
echo " • If you are running this script directory instead of via '$ npm run deploy', ensure you have installed composer in --no-dev mode."
echo
output 3 "Do you want to continue? [y/N]: "
read -r PROCEED
echo

if [ "$(echo "${PROCEED:-n}" | tr "[:upper:]" "[:lower:]")" != "y" ]; then
output 1 "Release cancelled!"
exit 1
fi
echo
output 3 "Please enter the version number to tag, for example, 1.0.0:"
read -r VERSION
echo

# Check if is a pre-release.
if is_substring "-" "${VERSION}"; then
IS_PRE_RELEASE=true
output 2 "Detected pre-release version!"
fi

printf "Ready to proceed? [y/N]: "
read -r PROCEED
echo

if [ "$(echo "${PROCEED:-n}" | tr "[:upper:]" "[:lower:]")" != "y" ]; then
output 1 "Release cancelled!"
exit 1
fi

output 2 "Starting release to GitHub..."
echo

CURRENTBRANCH="$(git rev-parse --abbrev-ref HEAD)"

# Create a release branch.
BRANCH="build/${VERSION}"
git checkout -b $BRANCH

# Push branch upstream
git push origin $BRANCH

# Create the new release.
if [ $IS_PRE_RELEASE = true ]; then
hub release create -m $VERSION -m "Release of version $VERSION. See readme.txt for details." -t $BRANCH --prerelease "v${VERSION}"
else
hub release create -m $VERSION -m "Release of version $VERSION. See readme.txt for details." -t $BRANCH "v${VERSION}"
fi

git checkout $CURRENTBRANCH
git branch -D $BRANCH
git push origin --delete $BRANCH

output 2 "GitHub release complete."
Binary file modified i18n/vendidero-helper-de_DE.mo
Binary file not shown.
Loading

0 comments on commit 0192377

Please sign in to comment.