Skip to content

Commit

Permalink
main/prepare: Move xdeb URL strings to pkg/constants
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Reichl <[email protected]>
  • Loading branch information
thetredev committed Oct 3, 2023
1 parent 107c59a commit 393a52f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ func prepare(context *cli.Context) error {

if len(version) == 0 {
// install master
url = "https://raw.githubusercontent.com/toluschr/xdeb/master/xdeb"
url = xdeb.XDEB_MASTER_URL
version = "master"
} else {
url = fmt.Sprintf("https://github.com/toluschr/xdeb/releases/download/%s/xdeb", version)
url = fmt.Sprintf(xdeb.XDEB_RELEASE_URL, version)
}

path := filepath.Join(os.TempDir(), "xdeb-download")
Expand Down
2 changes: 2 additions & 0 deletions pkg/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const APPLICATION_NAME = "xdeb-install"
const LOG_MESSAGE_PREFIX = "[" + APPLICATION_NAME + "]"

const XDEB_URL = "https://github.com/toluschr/xdeb/releases"
const XDEB_MASTER_URL = "https://raw.githubusercontent.com/toluschr/xdeb/master/xdeb"
const XDEB_RELEASE_URL = "https://github.com/toluschr/xdeb/releases/download/%s/xdeb"

const XDEB_INSTALL_REPOSITORIES_TAG = "v1.0.0"
const XDEB_INSTALL_REPOSITORIES_URL = "https://raw.githubusercontent.com/thetredev/xdeb-install-repositories/%s/repositories/%s/lists.yaml"

0 comments on commit 393a52f

Please sign in to comment.