mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
ci: deploy package index to esp8266.github.io (#6062)
* ci: deploy package index to esp8266.github.io * Update deploy_package_index.sh Fix path for git add
This commit is contained in:
parent
0ab76fcb37
commit
5b5e56ad43
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# This script updates package index hosted on arduino.esp8266.com.
|
# This script updates package index hosted on esp8266.github.io (aka arduino.esp8266.com).
|
||||||
# Normally is run by Travis CI for tagged versions, as a deploy step.
|
# Normally is run by Travis CI for tagged versions, as a deploy step.
|
||||||
|
|
||||||
tag=`git describe --tags`
|
tag=`git describe --tags`
|
||||||
@ -10,26 +10,23 @@ cd $(dirname "$0")
|
|||||||
# Decrypt and install SSH private key.
|
# Decrypt and install SSH private key.
|
||||||
# "encrypted_xxx_key" and "encrypted_xxx_iv" are environment variables
|
# "encrypted_xxx_key" and "encrypted_xxx_iv" are environment variables
|
||||||
# known to Travis CI builds.
|
# known to Travis CI builds.
|
||||||
openssl aes-256-cbc -K $encrypted_3f14690ceb9b_key -iv $encrypted_3f14690ceb9b_iv -in arduino-esp8266-travis.enc -out arduino-esp8266-travis -d
|
openssl aes-256-cbc -K $encrypted_3a94a4db7dec_key -iv $encrypted_3a94a4db7dec_iv -in esp8266_github_io_deploy.enc -out esp8266_github_io_deploy -d
|
||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
chmod 600 arduino-esp8266-travis
|
chmod 600 esp8266_github_io_deploy
|
||||||
ssh-add arduino-esp8266-travis
|
ssh-add esp8266_github_io_deploy
|
||||||
|
echo -e "Host github.com\nStrictHostKeyChecking no\n" >> ~/.ssh/config
|
||||||
|
|
||||||
# Set SSH server public key
|
# Clone the Github pages repository
|
||||||
echo "arduino.esp8266.com,104.131.82.128 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAvoxsdf1jJ1XX7RrCtAQyjvZ3b33bWYfB/XDvEMLtxnJhZr+P/wa7yuZ+UJJ1wuJc+wcIMBNZ2Zz/MbdRMey7A=" \
|
git clone git@github.com:esp8266/esp8266.github.io.git
|
||||||
>> $HOME/.ssh/known_hosts
|
pushd esp8266.github.io
|
||||||
|
|
||||||
branch=stable
|
# Update the package index
|
||||||
ssh_dl_server=nodeuser@arduino.esp8266.com
|
cp ../versions/$tag/package_esp8266com_index.json stable/package_esp8266com_index.json
|
||||||
base_dir=apps/download_files/download
|
git add stable/package_esp8266com_index.json
|
||||||
|
|
||||||
# Upload package_esp8266com_index.json
|
# Commit and push the changes
|
||||||
ssh $ssh_dl_server "mkdir -p $base_dir/versions/$tag"
|
git config user.email "travis@travis-ci.org"
|
||||||
scp versions/$tag/package_esp8266com_index.json $ssh_dl_server:$base_dir/versions/$tag/
|
git config user.name "Travis CI"
|
||||||
|
git commit -m "update package index for release $tag"
|
||||||
# Change symlink for stable version
|
git push origin master
|
||||||
oldver=$(ssh $ssh_dl_server "readlink $base_dir/$branch")
|
popd
|
||||||
newver="versions/$tag"
|
|
||||||
echo "Changing version of $branch from $oldver to $newver"
|
|
||||||
|
|
||||||
ssh $ssh_dl_server "pushd apps/download_files/download && ln -snf versions/$tag $branch"
|
|
||||||
|
BIN
package/esp8266_github_io_deploy.enc
Normal file
BIN
package/esp8266_github_io_deploy.enc
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user