-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·36 lines (26 loc) · 879 Bytes
/
release.sh
File metadata and controls
executable file
·36 lines (26 loc) · 879 Bytes
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
35
36
#!/bin/bash
# release.sh - Script para empacotar e publicar nova versão do iPyScan
set -e
echo "📦 Iniciando processo de build do iPyScan..."
# Solicita versão ao usuário
read -p "Digite a nova versão (ex: 1.0.1): " version
# Atualiza a versão no setup.cfg
echo "🔧 Atualizando versão para $version..."
sed -i "s/^version = .*/version = $version/" setup.cfg
# Remove builds anteriores
echo "🧹 Limpando builds antigos..."
rm -rf dist/ build/ *.egg-info
# Gera os arquivos .tar.gz e .whl
echo "🔨 Gerando pacotes..."
python3 -m build
# Exibe resultado
echo "📁 Pacotes gerados:"
ls dist/
# Pergunta se deseja publicar
read -p "Deseja publicar no PyPI agora? (s/n): " publish
if [ "$publish" = "s" ]; then
echo "☁️ Enviando para o PyPI..."
twine upload dist/*
else
echo "✅ Build finalizado. Pronto para testes locais ou push manual."
fi