forked from tmecklem/elixir_lcd
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CD configuration for publishing releases to hex
- Loading branch information
Showing
3 changed files
with
59 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/expect | ||
|
||
set timeout 9 | ||
set hex_user "$env(HEX_USER)" | ||
set hex_password "$env(HEX_PW)" | ||
log_user 0 | ||
|
||
spawn mix hex.user auth | ||
|
||
expect { | ||
timeout { send_user "\n Failed authenticating with hex\n"; exit 1 } | ||
"Username:" | ||
} | ||
|
||
send "$hex_user\r" | ||
|
||
expect { | ||
"Password:" | ||
} | ||
|
||
send "$hex_password\r" | ||
|
||
expect { | ||
"*API key with user password..." | ||
} | ||
|
||
send_user "\nSuccessfully Authenticated.\n" | ||
|
||
wait | ||
close |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/expect | ||
|
||
set timeout 9 | ||
set hex_password "$env(HEX_PW)" | ||
log_user 0 | ||
|
||
spawn mix hex.publish | ||
|
||
expect { | ||
"Password:" | ||
} | ||
|
||
send "$hex_password\r" | ||
|
||
log_user 1 | ||
|
||
expect { | ||
"*[Yn]?" | ||
} | ||
|
||
send "Y\r" | ||
|
||
wait | ||
close |