File: post_create.sh

package info (click to toggle)
python-jira 3.10.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,024 kB
  • sloc: python: 8,877; sh: 13; makefile: 7; xml: 4
file content (34 lines) | stat: -rwxr-xr-x 1,479 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# This file is run from the .vscode folder
WORKSPACE_FOLDER=/workspaces/jira

# Start the Jira Server docker instance first so can be running while we initialise everything else
# Need to ensure this --version matches what is in CI
echo "Initiating jira server instance, use the docker extension to inspect the logs (takes around 10/15mins to startup)"
docker run -dit -p 2990:2990 --name jira addono/jira-software-standalone --version 8.17.1
echo "Once started up, Jira host port is forwarded and can be found on: localhost:2990/jira/"

# For Windows uses that have cloned into Windows' partition, we do this so that
# it doesn't show all the files as "changed" for having different line endings.
# As we use pre-commit for managing our line endings we do this to tell git we don't care
git config --global core.autocrlf input
git add .

# Install tox and pre-commit
pipx install pre-commit
pipx install tox

# Sanity check that we can run pre-commit env
pre-commit run mypy --all-files

# Set the PIP_CONSTRAINT env variable
PIP_CONSTRAINT=$WORKSPACE_FOLDER/constraints.txt
if [ -f "$PIP_CONSTRAINT" ]; then
    echo "$PIP_CONSTRAINT found, use 'unset PIP_CONSTRAINT' if you want to remove the constraints."
    echo "export PIP_CONSTRAINT="$PIP_CONSTRAINT"" >> ~/.bashrc && source ~/.bashrc
else
    echo "$PIP_CONSTRAINT was not found, dependencies are not controlled."
fi

# Install package in editable mode with test dependencies
pip install -e .[cli,opt,test]