Skip to content

Instantly share code, notes, and snippets.

@WuglyakBolgoink
Created October 3, 2019 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WuglyakBolgoink/b7e4baf9ce6e80d7d6ecbdadcadb43ff to your computer and use it in GitHub Desktop.
Save WuglyakBolgoink/b7e4baf9ce6e80d7d6ecbdadcadb43ff to your computer and use it in GitHub Desktop.
Cordova aliases to upgrade platform and plugins
# -----------------------------------------
# Alias "coupplat" = cordova upgrade platfrom
# -----------------------------------------
# Usage: coupplat <platform_name> <version>
# $ coupplat android 8.1.1
# $ coupplat ios 4.0.0
#
# Todo's:
# - add check if this is cordova project/folder
alias coupplat='function _cordovaUpgradePlatform(){ echo "Platform: $1"; echo "Version: $2"; pwd; cordova platform rm "cordova-$1" --save; cordova platform add "cordova-$1@$2" --save;};_cordovaUpgradePlatform'
# -----------------------------------------
# -----------------------------------------
# Alias "coupplug" = cordova upgrade plugin
# -----------------------------------------
# Usage: coupplug <plugin_name> <version> <plugin_source>
# $ coupplug cordova-plugin-splashscreen 5.0.3 cordova-plugin-splashscreen
# $ coupplug cordova-plugin-ios-keychain 5.0.3 https://github.com/ionic-team/cordova-plugin-ios-keychain
#
# Memo: plugin_source is temporary alias. This should be a link to custom source path like github, or local folder.
#
# Todo's:
# - add check if this is cordova project/folder
# - do not use version if plugin_source exist
alias coupplug='function _cordovaUpgradePlugin(){ echo "Plugin: $1"; echo "Plugin Alias/Path: $3"; echo "Version: $2"; pwd; cordova plugin rm "$1" --save; cordova plugin add "$3@$2" --save;};_cordovaUpgradePlugin'
# -----------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment