Skip to content

Commit

Permalink
0.4.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan committed Aug 24, 2022
1 parent f0b9035 commit c364f33
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

# [0.4.10] (2022-08-24)

- Fixed an issue in **Install XSOAR local development environment** where dependency installation fails even though installation succeeded.
- Install `virtualenv` module in **Open integration/script in virtual environment** if the module is not installed.
- Installing **Demisto-SDK** globally will update it.

# [0.4.9] (2022-08-23)

- Added installation and configuration of `pyenv` in **Install XSOAR local development environment**.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ When working on an integration or a script, you can right click on it, and click

This is the recommended way to develop and debug your integration.

> **_NOTE:_** The python version that used is the one that configured in the VSCode settings. To change the python version, [select a different python interpreter in VSCode](https://code.visualstudio.com/docs/python/environments#:~:text=By%20default%2C%20the%20Python%20extension,interpreter%2C%20it%20issues%20a%20warning.).
## Dev Containers (Advanced)

The extension supports opening an integration or a script in a dev container.
Expand Down
6 changes: 3 additions & 3 deletions Scripts/setup_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ if [[ $dependencies == *"docker"* ]]; then
brew install --cask docker || echo "Install Docker manually"
fi

brew install $dependencies
brew install $dependencies || true

if [[ $dependencies == *"pyenv"* ]]; then
# If pyenv not already exists in zshrc, add it
if [ -f ~/.zshrc ] && [ -x "$(command -v pyenv)" ]; then
if [ -f ~/.zshrc ] && ! [ -x "$(command -v pyenv)" ]; then
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
fi

export PYENV_ROOT="$HOME/.pyenv";
export PATH="$PYENV_ROOT/bin":$PATH;
eval "$(pyenv init -)" || echo "No pyenv, procceding without";
eval "$(pyenv init -)"
# get latest python version from the pyenv list
LATEST_PYTHON=$(pyenv install --list | grep --extended-regexp "^\s*[0-9][0-9.]*[0-9]\s*$" | tail -1);
pyenv install "$LATEST_PYTHON" 2.7.18;
Expand Down
6 changes: 6 additions & 0 deletions Scripts/setup_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ docker run --name "${name}" "$testImage" 'pip list --format=freeze > /requiremen
docker cp "${name}":/requirements.txt .
docker rm -f "${name}" || true

# check if virtualenv module is installed
isVirtualEnvInstalled=true
$pythonPath -m virtualenv --version > /dev/null 2>&1 || isVirtualEnvInstalled=false
if [ "$isVirtualEnvInstalled" = "false" ]; then
$pythonPath -m pip install virtualenv
fi
$pythonPath -m virtualenv -p python"${pythonVersion}" venv
venv/bin/pip --version || (echo "No pip, check your python"${pythonVersion}" installation" && exit 1)
while read line; do
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "xsoar",
"displayName": "Cortex XSOAR",
"description": "Build, Format, and Validate Cortex XSOAR with ease.",
"version": "0.4.9",
"version": "0.4.10",
"engines": {
"vscode": "^1.54.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function installDemistoSDKLocally(): Promise<void> {

export async function installDemistoSDKGlobally(): Promise<void> {
// if pipx is installed no need to install pipx with pip
TerminalManager.sendText('pipx --version || pip install pipx && pipx ensurepath --force && pipx install demisto-sdk --force');
TerminalManager.sendText('(pipx --version || pip install pipx) && pipx ensurepath --force && pipx install demisto-sdk --force && pipx upgrade demisto-sdk');
}

export async function isDemistoSDKinstalled(): Promise<boolean> {
Expand Down

0 comments on commit c364f33

Please sign in to comment.