Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ jobs:

- name: Checkout required submodules
run: |
git submodule update --init --depth 1 scripts/build-tools
git submodule update --init --depth 1 scripts/changes
git submodule update --init --depth 1 docs/_theme

- name: Install the tool dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ _site

/docs/current.json
/docs/releases
/scripts/Pipfile.lock
8 changes: 0 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
path = macos/dependencies/interact
url = https://github.com/inseven/interact.git
branch = main
[submodule "scripts/changes"]
path = scripts/changes
url = https://github.com/jbmorley/changes.git
branch = main
[submodule "scripts/build-tools"]
path = scripts/build-tools
url = https://github.com/jbmorley/build-tools.git
branch = main
[submodule "HighlightedTextEditor"]
path = macos/dependencies/HighlightedTextEditor
url = https://github.com/jbmorley/HighlightedTextEditor.git
Expand Down
14 changes: 14 additions & 0 deletions scripts/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]

name = "pypi"
url = "https://pypi.python.org/simple"
verify_ssl = true

[packages]

changes-semver = "==6.*"
inseven-build-tools = "==1.*"

[requires]

python_version = "3.12"
1 change: 0 additions & 1 deletion scripts/build-tools
Submodule build-tools deleted from 17db90
5 changes: 3 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ trap cleanup EXIT

# Determine the version and build number.
VERSION_NUMBER=`changes version`
BUILD_NUMBER=`build-number.swift`
BUILD_NUMBER=`build-tools generate-build-number`

# Import the certificates into our dedicated keychain.
echo "$APPLE_DISTRIBUTION_CERTIFICATE_PASSWORD" | build-tools import-base64-certificate --password "$KEYCHAIN_PATH" "$APPLE_DISTRIBUTION_CERTIFICATE_BASE64"
Expand Down Expand Up @@ -180,7 +180,8 @@ echo -n "$APPLE_API_KEY_BASE64" | base64 --decode -o "$API_KEY_PATH"
build-tools notarize "$BUILD_DIRECTORY/Thoughts.app" \
--key "$API_KEY_PATH" \
--key-id "$APPLE_API_KEY_ID" \
--issuer "$APPLE_API_KEY_ISSUER_ID"
--issuer "$APPLE_API_KEY_ISSUER_ID" \
--log-directory "$BUILD_DIRECTORY"

# Compress the app.
APP_BASENAME="Thoughts.app"
Expand Down
1 change: 0 additions & 1 deletion scripts/changes
Submodule changes deleted from 71f6d8
22 changes: 14 additions & 8 deletions scripts/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ SCRIPTS_DIRECTORY="$ROOT_DIRECTORY/scripts"

export LOCAL_TOOLS_PATH="$ROOT_DIRECTORY/.local"

export BIN_DIRECTORY="$ROOT_DIRECTORY/.local/bin"
export PATH=$BIN_DIRECTORY:$PATH
# Keep Python user installs local to the project instead of polluting the host.
export PYTHONUSERBASE="$LOCAL_TOOLS_PATH/python"
mkdir -p "$PYTHONUSERBASE"
export PATH="$PYTHONUSERBASE/bin":$PATH

source "$LOCAL_TOOLS_PATH/python/bin/activate"

export PIPENV_VENV_IN_PROJECT=1
# Keep pipenv virtualenvs local and predictable.
export WORKON_HOME="$LOCAL_TOOLS_PATH"
export PIPENV_CUSTOM_VENV_NAME="venv"
export PIPENV_VENV_IN_PROJECT=0
export PIPENV_IGNORE_VIRTUALENVS=1
export PIPENV_PIPFILE="$SCRIPTS_DIRECTORY/Pipfile"

# Add the tools to the path.
export PATH="$LOCAL_TOOLS_PATH/venv/bin":$PATH

export PATH=$PATH:"$SCRIPTS_DIRECTORY/changes"
export PATH=$PATH:"$SCRIPTS_DIRECTORY/build-tools"
export PATH=$PATH:"$ROOT_DIRECTORY/macos/dependencies/diligence/scripts"
# Activate mise to pin the Python version used to run the tools.
eval "$(mise activate bash)"
12 changes: 3 additions & 9 deletions scripts/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ ROOT_DIRECTORY="$( cd "$( dirname "$( dirname "${BASH_SOURCE[0]}" )" )" &> /dev/
SCRIPTS_DIRECTORY="$ROOT_DIRECTORY/scripts"

LOCAL_TOOLS_PATH="$ROOT_DIRECTORY/.local"
CHANGES_DIRECTORY="$SCRIPTS_DIRECTORY/changes"
BUILD_TOOLS_DIRECTORY="$SCRIPTS_DIRECTORY/build-tools"

# Install tools defined in `.tool-versions`.
cd "$ROOT_DIRECTORY"
Expand All @@ -42,13 +40,9 @@ if [ -d "$LOCAL_TOOLS_PATH" ] ; then
fi
mkdir -p "$LOCAL_TOOLS_PATH"

# Set up a Python venv to bootstrap our python dependency on `pipenv`.
python -m venv "$LOCAL_TOOLS_PATH/python"

# Source `environment.sh` to ensure the remainder of our paths are set up correctly.
source "$SCRIPTS_DIRECTORY/environment.sh"

# Install the Python dependencies.
pip install --upgrade pip pipenv wheel certifi
PIPENV_PIPFILE="$CHANGES_DIRECTORY/Pipfile" pipenv install
PIPENV_PIPFILE="$BUILD_TOOLS_DIRECTORY/Pipfile" pipenv install
# Install the Python dependencies (uses PIPENV_PIPFILE from environment.sh).
pip install --user --ignore-installed --upgrade pip pipenv wheel certifi
pipenv install