Генерация списка изменений для debian приведена к корректному виду
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
Калинин Сергей Валерьевич 2024-08-20 13:30:43 +03:00
parent 42349a4701
commit e1db775b3b
3 changed files with 76 additions and 15 deletions

View File

@ -51,6 +51,7 @@ switch $tcl_platform(platform) {
proc ReadGitLog {} { proc ReadGitLog {} {
global gitCommand global gitCommand
set cmd exec set cmd exec
set i 0
lappend cmd "$gitCommand" lappend cmd "$gitCommand"
lappend cmd "log" lappend cmd "log"
lappend cmd "--abbrev-commit" lappend cmd "--abbrev-commit"
@ -66,7 +67,8 @@ proc ReadGitLog {} {
if {[regexp -nocase -all -- {^[0-9a-z]+} $line match]} { if {[regexp -nocase -all -- {^[0-9a-z]+} $line match]} {
if {$outBuffer ne ""} { if {$outBuffer ne ""} {
# puts $outBuffer # puts $outBuffer
lappend res $outBuffer lappend res [list $i $outBuffer]
incr i
} }
set outBuffer $line set outBuffer $line
} else { } else {
@ -80,32 +82,45 @@ proc ReadGitLog {} {
} }
proc GenerateChangelogDEB {} { proc GenerateChangelogDEB {} {
puts "GenerateChangelogDEB" global projectName projectVersion projectRelease
# puts "GenerateChangelogDEB"
set lastCommitTimeStamp "" set lastCommitTimeStamp ""
set commiter "" set commiter ""
set commitText "" set commitText ""
# ReadGitLog # ReadGitLog
set lst [lsort -decreasing [ReadGitLog]] set lst [lsort -integer -index 0 [ReadGitLog]]
# puts [lindex $lst 0] # puts $lst
# exit # exit
foreach line $lst { foreach l $lst {
set index [lindex $l 0]
set line [lindex $l 1]
# puts "$index - $line"
set record [split $line ","] set record [split $line ","]
# puts [lindex $record 1] set timeStamp [string trim [lindex $record 1]]
set email [string trim [lindex $record 3]]
if {$lastCommitTimeStamp eq ""} { if {$lastCommitTimeStamp eq ""} {
set lastCommitTimeStamp [string trim [lindex $record 1]] set lastCommitTimeStamp [string trim [lindex $record 1]]
} }
# set timeStamp set s [clock scan {Mon Jan 22 17:30:28 2018 +0300}] -format {%a %b %e %H:%M:%S %Y %z} set timeStamp [clock format [clock scan $timeStamp] -format {%a, %e %b %Y %H:%M:%S %z}]
# puts "> $commiter"
if {$commiter ne [lindex $record 2]} { if {$index == 0} {
puts "\n \[ [string trim $commiter] \]" puts "$projectName ($projectVersion-$projectRelease) stable; urgency=medium\n"
set commiter [lindex $record 2] set commiter [lindex $record 2]
# puts "\n \[ [string trim $commiter] \]"
}
# puts ">> $commiter"
if {$commiter ne [lindex $record 2]} {
puts "\n -- [string trim $commiter] <$email> $timeStamp"
puts "\n$projectName ($projectVersion-$projectRelease) stable; urgency=medium\n"
set commiter [lindex $record 2]
# puts "\n \[ [string trim $commiter] \]"
} }
set commitTex [lindex $record 4] set commitTex [lindex $record 4]
puts " * $commitTex" puts " * $commitTex"
} }
puts $lastCommitTimeStamp puts "\n -- [string trim $commiter] <$email> $timeStamp"
} }
proc GenerateChangelogRPM {} { proc GenerateChangelogRPM {} {
@ -115,6 +130,7 @@ proc GenerateChangelogRPM {} {
proc GenerateChangelogTXT {} { proc GenerateChangelogTXT {} {
puts "GenerateChangelogTXT" puts "GenerateChangelogTXT"
puts [ReadGitLog]
} }
# puts [ReadGitLog] # puts [ReadGitLog]
@ -126,6 +142,28 @@ proc ShowHelp {} {
puts "Where{DEB RPM TXT} - changelog format for same packages. The list can be either complete or from any number of elements.\nDefault is a TXT" puts "Where{DEB RPM TXT} - changelog format for same packages. The list can be either complete or from any number of elements.\nDefault is a TXT"
} }
if [info exists env(PROJECT_NAME)] {
set projectName $env(PROJECT_NAME)
# puts $projectName
} else {
puts "You mast set PROJECT_NAME variable \n"
exit
}
if [info exists env(PROJECT_VERSION)] {
set projectVersion $env(PROJECT_VERSION)
# puts $projectVersion
} else {
puts "You mast set PROJECT_VERSION variable \n"
exit
}
if [info exists env(PROJECT_RELEASE)] {
set projectRelease $env(PROJECT_RELEASE)
# puts $projectRelease
} else {
puts "You mast set PROJECT_RELEASE variable \n"
exit
}
if { $::argc > 1 } { if { $::argc > 1 } {
foreach arg $::argv { foreach arg $::argv {
switch -glob -nocase $arg { switch -glob -nocase $arg {
@ -136,6 +174,5 @@ if { $::argc > 1 } {
} }
} }
} else { } else {
GenerateChangelogTXT ShowHelp
} }

26
debian/changelog vendored
View File

@ -1,5 +1,6 @@
projman (2.0.0-alpha3) stable; urgency=medium projman (2.0.0-alpha3) stable; urgency=medium
* Генерация списка изменений для debian приведена к корректному виду
* Исправлен фокус при создании нового файла. #3 * Исправлен фокус при создании нового файла. #3
-- Калинин Сергей Валерьевич <svkalinin@samsonpost.ru> Wed, 17 Jul 2024 12:28:30 +0300 -- Калинин Сергей Валерьевич <svkalinin@samsonpost.ru> Wed, 17 Jul 2024 12:28:30 +0300
@ -15,9 +16,32 @@ projman (2.0.0-alpha3) stable; urgency=medium
projman (2.0.0-alpha3) stable; urgency=medium projman (2.0.0-alpha3) stable; urgency=medium
* Финальный тест сборки * Финальный тест сборки
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Попытка загрузки собранного пакета * Попытка загрузки собранного пакета
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить debian/build-deb-projman.sh * Обновить debian/build-deb-projman.sh
* Обновить .gitea/workflows/build.yml * Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
* Обновить .gitea/workflows/build.yml
-- svk <svkalinin@samsonpost.ru> Mon, 24 Jun 2024 10:15:38 +0300 -- svk <svkalinin@samsonpost.ru> Mon, 24 Jun 2024 10:15:38 +0300
@ -35,7 +59,7 @@ projman (2.0.0-alpha3) stable; urgency=medium
* Обновить .gitea/workflows/build.yml * Обновить .gitea/workflows/build.yml
* revert 61f2bca699ce31159c93cf0d07d29aeae1fc964e * revert 61f2bca699ce31159c93cf0d07d29aeae1fc964e
-- svk <> Tue, 20 Aug 2024 13:26:28 +0300 -- svk <> Tue, 20 Aug 2024 13:29:15 +0300
projman (2.0.0-alpha3) stable; urgency=medium projman (2.0.0-alpha3) stable; urgency=medium

View File

@ -10,7 +10,7 @@ exec wish "$0" -- "$@"
###################################################### ######################################################
# Version: 2.0.0 # Version: 2.0.0
# Release: alpha # Release: alpha
# Build: 29072024172751 # Build: 20082024132949
###################################################### ######################################################
# определим текущую версию, релиз и т.д. # определим текущую версию, релиз и т.д.