Skip to content

Commit

Permalink
🎉 release v1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
theapache64 committed May 23, 2021
1 parent e860e18 commit bcca50c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ similar syntax as npm.

## Install ⚙️

Copy-paste below command into your terminal to install latest version

```shell script
wget "https://raw.githubusercontent.com/theapache64/gpm/master/install.sh" -q --show-progress -O install.sh && sh install.sh && source ~/.bashrc
sudo npm install -g gpm-cli
```

## Usage ⌨️
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
apply plugin: 'kotlin-kapt'

group 'com.theapache64.gpm'
version 'v1.0.2'
version '1.0.3'

repositories {
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "index.js",
"preferGlobal": true,
"repository": "https://github.com/theapache64/gpm",
"version": "1.0.2",
"version": "1.0.3",
"jdeploy": {
"jar": "gpm.main.jar"
},
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/theapache64/gpm/commands/gpm/Gpm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import javax.inject.Singleton

@CommandLine.Command(
name = "gpm",
version = ["v1.0.1"],
version = ["v1.0.3"],
mixinStandardHelpOptions = true,
subcommands = [
Install::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ import com.theapache64.gpm.core.gm.GradleManager
import com.theapache64.gpm.data.remote.gpm.models.GpmDep
import com.theapache64.gpm.data.repos.GpmRepo
import com.theapache64.gpm.data.repos.MavenRepo
import picocli.CommandLine
import javax.inject.Inject

const val RESET_COLOR = "\u001b[0m" // Text Reset
const val GREEN_BOLD = "\u001b[1;32m" // GREEN

class InstallViewModel @Inject constructor(
private val gpmRepo: GpmRepo,
private val mavenRepo: MavenRepo,
Expand Down Expand Up @@ -89,28 +91,24 @@ class InstallViewModel @Inject constructor(
val mostUsed = mavenDeps.maxBy { it.usage ?: 0 }!!
val selDepIndex = if (mavenDeps.size > 1) {

val index = install.chooseIndex(
mavenDeps.map {
val text = "${it.groupId}:${it.artifactId}"
if (it == mostUsed) {
// color text
CommandLine.Help.Ansi.AUTO.string("@|bold,green $text|@")
} else {
//normal text
text
}
val choosables = mavenDeps.map {
val text = "${it.groupId}:${it.artifactId}"
if (it == mostUsed) {
// color text
"$GREEN_BOLD$text${RESET_COLOR}"
} else {
//normal text
text
}
)

index
}
install.chooseIndex(choosables)
} else {
0
}

val selMavenDep = mavenDeps[selDepIndex]

// Getting latest version

val artifactInfo = mavenRepo.getLatestVersion(
selMavenDep.groupId,
selMavenDep.artifactId
Expand Down

0 comments on commit bcca50c

Please sign in to comment.