Skip to content

Commit

Permalink
Fix release build issues
Browse files Browse the repository at this point in the history
* Make temp directory if it doesn't already exist when creating keychain
* Use a git patch to update Spyder's version when building conda package. This ensures a clean repo for get_version to report the version accurately.
  • Loading branch information
mrclary committed Feb 8, 2024
1 parent 80da779 commit 34c54a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions installers-conda/build_conda_pkgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ def _patch_source(self):
)
file.write_text(file_text)

self.repo.git.diff(
output=(self._fdstk_path / "recipe" / "version.patch").as_posix()
)
self.repo.git.stash()

def _patch_meta(self, meta):
# Get current Spyder requirements
yaml = YAML()
Expand Down Expand Up @@ -239,6 +244,10 @@ def _patch_meta(self, meta):
meta = re.sub(r'^(requirements:\n(.*\n)+ run:\n)( .*\n)+',
rf'\g<1> - {cr_string}\n', meta, flags=re.MULTILINE)

# Add version patch
meta = re.sub(r'^(source:\n(.*\n)* patches:\n)',
r'\g<1> - version.patch\n',
meta, flags=re.MULTILINE)
return meta


Expand Down
2 changes: 1 addition & 1 deletion installers-conda/certkeychain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ cleanup(){
log "Removing $KEYCHAIN..."
security list-keychain -s login.keychain
security delete-keychain $KEYCHAIN
rm -rf $CERTFILE
}

while getopts "hc" option; do
Expand Down Expand Up @@ -70,6 +69,7 @@ for cert in ${CERTS[@]}; do
_cert=$cert
else
log "Decoding/importing base64 cert..."
mkdir -p $SPYTMPDIR
echo $cert | base64 --decode > $CERTFILE
_cert=$CERTFILE
fi
Expand Down

0 comments on commit 34c54a5

Please sign in to comment.