LoginSignup
0
0

More than 5 years have passed since last update.

[JAWS-UG CLI] CodeCommit #3 サンプルコードの更新

Last updated at Posted at 2016-10-10

CodeCommit上のリポジトリを更新してみます。

前提条件

CodeCommitリポジトリへのSSHアクセス権限

CodeCommit上のリポジトリにSSHでアクセスする権限があること。

unixコマンド

  • curlコマンドが利用できること。
  • unzipコマンドが利用できること。

0. 準備

ローカルリポジトリへの移動

コマンド
cd ~/tmp/${CODEC_REPOSITORY_NAME} \
  && pwd

1. 事前作業

2. リポジトリへの登録

コマンド
cat << EOF > index.html
<!DOCTYPE html>
<html>
<head>
        <title>Updated Sample Deployment</title>
        <style>
          body {
            color: #000000;
            background-color: #CCFFCC;
            font-family: Arial, sans-serif;
            font-size:14px;
          }

          h1 {
            font-size: 250%;
            font-weight: normal;
            margin-bottom: 0;
          }

          h2 {
            font-size: 175%;
            font-weight: normal;
            margin-bottom: 0;
          }
        </style>
      </head>
      <body>
        <div align="center"><h1>Updated Sample Deployment</h1></div>
        <div align="center"><h2>This application was updated using AWS CodePipeline, AWS CodeCommit, and AWS CodeDeploy.</h2></div>
        <div align="center">
          <p>Learn more:</p>
          <p><a href="http://docs.aws.amazon.com/codepipeline/latest/userguide/">AWS CodePipeline User Guide</a></p>
          <p><a href="http://docs.aws.amazon.com/codecommit/latest/userguide/">AWS CodeCommit User Guide</a></p>
          <p><a href="http://docs.aws.amazon.com/codedeploy/latest/userguide/">AWS CodeDeploy User Guide</a></p>
        </div>
</body>
</html>
EOF


cat index.html
コマンド
git commit -am "Updated sample application files" \
  && git push

3. 事後作業

コマンド
git log
結果(例)
      commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      Author: taro <taro@example.com>
      Date:   Sun Oct 10 13:40:00 2016 +0900

          Added sample application files

完了

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0