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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Biçim [Keep a Changelog](https://keepachangelog.com/) esas alınmıştır.

## [Unreleased]

### Düzeltildi
- `scripts/release-publish.sh`: indeks adımı `index-publish.sh` çağrısına `--yes` geçirir (betiğin kendi y/N sorusu zaten yayın onayıdır; indeks `sign` ikinci onayı etkileşimsiz pencerede "iptal edildi" ile düşüyordu, v0.1.2 yayınında yaşandı). `--dry-run` planı ve hata mesajındaki yeniden çalıştırma komutu da `--yes` gösterir. Paket içeriği değişmedi (sürüm gerektirmez). Gerçek `index-publish.sh` ile DENENMEDİ (atrap betik, mutasyon testiyle doğrulandı).

## [0.1.2] - 2026-11-07

### Eklendi
Expand Down
8 changes: 4 additions & 4 deletions scripts/release-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ echo " 2) scripts/release.sh (paket + imza + kendi doğrulaması)"
echo " 3) gh release create $TAG $ARCHIVE $ARCHIVE.sig --title $TAG --notes-file <CHANGELOG [$VERSION] bölümü, $(wc -l < "$NOTES" | tr -d ' ') satır>"
echo " 4) yüklenen dosyaların SHA-256 özetini yerel dosyalarla karşılaştır"
echo " 5) components.lock taban bilgisi için SHA-256 ve imzalayıcı satırını yazdır (bilgi; sshpocket reposuna DOKUNULMAZ)"
echo " 6) indeks: $INDEX_PUBLISH $ID $VERSION <sahip/depo> --archive $ARCHIVE --sig $ARCHIVE.sig (indeks deposunda yerel commit; push sizde)"
echo " 6) indeks: $INDEX_PUBLISH $ID $VERSION <sahip/depo> --archive $ARCHIVE --sig $ARCHIVE.sig --yes (indeks deposunda yerel commit; push sizde)"
if [ "$DRY" = 1 ]; then echo "[dry-run] hiçbir şey yapılmadı."; exit 0; fi
if [ "$YES" = 0 ]; then
read -r -p "Devam edilsin mi? (etiket itilir, Release yayımlanır) [y/N] " ans </dev/tty || ans=""
Expand Down Expand Up @@ -102,9 +102,9 @@ for f in "$ARCHIVE" "$ARCHIVE.sig"; do
[ -n "$got" ] || die "Release'te $(basename "$f") yok"
[ "$got" = "$want" ] || die "$(basename "$f") özeti uyuşmuyor: Release=$got yerel=$want"
done
# 6) indeks: Release ve özet doğrulaması geçti. İndeks hatası Release'i geçersiz kılmaz; indeks betiği tek başına yeniden çalıştırılabilir
if ! "$INDEX_PUBLISH" "$ID" "$VERSION" "$REPO" --archive "$ARCHIVE" --sig "$ARCHIVE.sig"; then
die "indeks güncellenemedi. Release $TAG YAYIMLANDI ve geçerli; index-publish.sh tek başına yeniden çalıştırılabilir: $INDEX_PUBLISH $ID $VERSION $REPO --archive $ARCHIVE --sig $ARCHIVE.sig"
# 6) indeks: Release ve özet doğrulaması geçti. --yes: bu betiğin y/N sorusu zaten yayın onayıdır; indeks `sign` ikinci onayı etkileşimsiz pencerede düşüyordu. İndeks hatası Release'i geçersiz kılmaz; indeks betiği tek başına yeniden çalıştırılabilir
if ! "$INDEX_PUBLISH" "$ID" "$VERSION" "$REPO" --archive "$ARCHIVE" --sig "$ARCHIVE.sig" --yes; then
die "indeks güncellenemedi. Release $TAG YAYIMLANDI ve geçerli; index-publish.sh tek başına yeniden çalıştırılabilir: $INDEX_PUBLISH $ID $VERSION $REPO --archive $ARCHIVE --sig $ARCHIVE.sig --yes"
fi
echo ""
echo "✅ $TAG yayımlandı ve yüklenen dosyaların özeti yerelle aynı."
Expand Down
4 changes: 3 additions & 1 deletion test/test_release_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ expect_eq "dry-run cikis 0" "0" "$rc"
expect_contains " plan: etiket" "$out" "git tag -a v$V"
expect_contains " plan: gh release create" "$out" "gh release create v$V"
expect_contains " plan: 6) indeks" "$out" "6) indeks: $IDX/scripts/index-publish.sh utility $V"
expect_contains " plan 6) satiri --yes gosterir" "$out" "--sig dist/utility-$V.tar.gz.sig --yes"
expect_contains " [dry-run] hicbir sey yapilmadi" "$out" "[dry-run] hiçbir şey yapılmadı"
if (cd "$TMP/r" && git rev-parse -q --verify "refs/tags/v$V" >/dev/null); then bad "dry-run etiket OLUSTURDU"; else ok "dry-run etiket olusturmadi"; fi
if git --git-dir="$TMP/o.git" rev-parse -q --verify "refs/tags/v$V" >/dev/null; then bad "dry-run etiketi ITTI"; else ok "dry-run etiketi itmedi"; fi
Expand Down Expand Up @@ -104,7 +105,7 @@ if [ -f "$FAKE_INDEX_LOG" ]; then bad "dry-run indeks betigini CALISTIRDI"; else
rm -f "$FAKE_INDEX_LOG"; fresh; out=$(pub --yes); rc=$?
idxcall=$(cat "$FAKE_INDEX_LOG" 2>/dev/null)
expect_eq "indeks adimli tam kosu cikis 0" "0" "$rc"
expect_contains " indeks: <id> <surum> <depo> --archive --sig" "$idxcall" "index-publish utility $V sahip/depo --archive dist/utility-$V.tar.gz --sig dist/utility-$V.tar.gz.sig"
expect_contains " indeks: <id> <surum> <depo> --archive --sig" "$idxcall" "index-publish utility $V sahip/depo --archive dist/utility-$V.tar.gz --sig dist/utility-$V.tar.gz.sig --yes"
expect_contains " indeks guncellendi mesaji" "$out" "İndeks güncellendi"
expect_not_contains " lock-component yonergesi yok" "$out" "SİZ güncelleyin"
if printf '%s' "$out" | awk '/ATRAP-INDEKS-CAGRILDI/ {i=NR} /✅/ {s=NR} END {exit !(s && i && i < s)}'; then ok "indeks adimi son ✅ satirindan once"; else bad "indeks adimi son ✅ satirindan SONRA ya da yok"; fi
Expand All @@ -114,6 +115,7 @@ if git --git-dir="$TMP/o.git" rev-parse -q --verify "refs/tags/v$V" >/dev/null;
fresh; export FAKE_INDEX_FAIL=1; out=$(pub --yes); rc=$?; unset FAKE_INDEX_FAIL
if [ "$rc" != "0" ]; then ok "indeks hatasi cikis kodu 0 degil"; else bad "indeks hatasi yutuldu"; fi
expect_contains " hata: Release gecerli, betik tek basina yeniden calistirilabilir" "$out" "tek başına yeniden çalıştırılabilir"
expect_contains " hata mesajindaki yeniden calistirma komutu --yes icerir" "$out" "--sig dist/utility-$V.tar.gz.sig --yes"
if [ -f "$TMP/gh.create" ]; then ok "indeks hatasinda Release zaten acilmisti"; else bad "Release yok"; fi
echo "-- ozet UYUSMAZSA durur"
fresh; export FAKE_DIGEST=kotu; out=$(pub --yes); rc=$?; unset FAKE_DIGEST
Expand Down