-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update super users and refactor episode number detection
- Loading branch information
Showing
7 changed files
with
18 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ type Deploy struct { | |
Dry bool | ||
} | ||
|
||
var supers = []string{"umputun", "bobuk", "ksenks", "grayodesa"} | ||
var superUsersTelegram = []string{"umputun", "bobuk", "ksenks", "grayodesa", "aleks_sys"} | ||
|
||
// Do performs a series of actions to deploy a new episode. | ||
// It takes an episode number as input and returns an error if any of the actions fail. | ||
|
@@ -39,7 +39,7 @@ func (d *Deploy) Do(episodeNum int) error { | |
|
||
log.Printf("[INFO] create chat log") | ||
slParams := []string{} | ||
for _, s := range supers { | ||
for _, s := range superUsersTelegram { | ||
slParams = append(slParams, fmt.Sprintf("--super=%s", s)) | ||
} | ||
d.Run("ssh [email protected]", fmt.Sprintf(`docker exec -i super-bot /srv/telegram-rt-bot %s --dbg --export-num=%d --export-path=/srv/html`, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,9 @@ func TestDeploy_Do(t *testing.T) { | |
assert.Equal(t, `cd /srv/site.hugo && git pull && docker-compose run --rm hugo`, ex.RunCalls()[1].Params[0]) | ||
|
||
assert.Equal(t, `ssh [email protected]`, ex.RunCalls()[2].Cmd) | ||
assert.Equal(t, []string{"docker exec -i super-bot /srv/telegram-rt-bot --super=umputun --super=bobuk --super=ksenks --super=grayodesa --dbg --export-num=123 --export-path=/srv/html"}, ex.RunCalls()[2].Params) | ||
|
||
assert.Equal(t, []string{"docker exec -i super-bot /srv/telegram-rt-bot " + | ||
"--super=umputun --super=bobuk --super=ksenks --super=grayodesa --super=aleks_sys " + | ||
"--dbg --export-num=123 --export-path=/srv/html"}, ex.RunCalls()[2].Params) | ||
} | ||
|
||
func TestDeploy_archiveNews(t *testing.T) { | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters