diff --git a/doric-cli/package.json b/doric-cli/package.json index c3cafab7..4a26f439 100644 --- a/doric-cli/package.json +++ b/doric-cli/package.json @@ -1,6 +1,6 @@ { "name": "doric-cli", - "version": "0.4.0", + "version": "0.4.2", "description": "Doric command line tools", "main": "index.js", "bin": { @@ -34,4 +34,4 @@ "publishConfig": { "registry": "https://registry.npmjs.org" } -} +} \ No newline at end of file diff --git a/doric-cli/target/android/app/build.gradle b/doric-cli/target/android/app/build.gradle index 7aeabb9a..88a1a7df 100644 --- a/doric-cli/target/android/app/build.gradle +++ b/doric-cli/target/android/app/build.gradle @@ -1,5 +1,12 @@ +import groovy.json.JsonSlurper + apply plugin: 'com.android.application' +def model = new JsonSlurper().parse(new File(project.rootDir.getParent() + File.separator + "package.json")) +def doricSDKVersion = model.dependencies.doric.replace("^", "") + +println("Doric Version:" + doricSDKVersion) + android { compileSdkVersion 29 buildToolsVersion "29.0.2" @@ -28,8 +35,8 @@ android { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - implementation "pub.doric:core:__$Version__" - debugImplementation "pub.doric:devkit:__$Version__" + implementation "pub.doric:core:$doricSDKVersion" + debugImplementation "pub.doric:devkit:$doricSDKVersion" } } diff --git a/doric-cli/target/iOS/Podfile b/doric-cli/target/iOS/Podfile index 6332ab66..446ca8b1 100644 --- a/doric-cli/target/iOS/Podfile +++ b/doric-cli/target/iOS/Podfile @@ -1,3 +1,9 @@ +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "../package.json"))) +version = package['dependencies']["doric"] +version = version.gsub('^','') + source 'https://cdn.cocoapods.org/' # Uncomment the next line to define a global platform for your project # platform :ios, '9.0' @@ -7,6 +13,6 @@ target '__$__' do use_frameworks! # Pods for __$__ - pod 'DoricCore', '~>__$Version__' - pod 'DoricDevkit', '~>__$Version__' + pod 'DoricCore', "#{version}" + pod 'DoricDevkit', "#{version}" end diff --git a/publish.sh b/publish.sh index f48b535f..82beac18 100644 --- a/publish.sh +++ b/publish.sh @@ -31,6 +31,8 @@ cd $CURRENT_DIR/doric-web && npm version $CURRENT_VERSION --allow-same-version ## CLI echo $CURRENT_VERSION > $CURRENT_DIR/doric-cli/target/version +cd $CURRENT_DIR/doric-cli && npm version $CURRENT_VERSION --allow-same-version + # git save cd $CURRENT_DIR/