fix asset ref; fix build/publish scripts
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# args: s3cmd-config
|
||||
# args: s3cmd-config asset-path
|
||||
|
||||
set -e
|
||||
|
||||
cd "./asset/$2"
|
||||
|
||||
s3cmd sync \
|
||||
--config "$1" \
|
||||
--acl-public \
|
||||
--no-preserve \
|
||||
--add-header 'cache-control:max-age=86400' \
|
||||
--verbose \
|
||||
"./asset/$2" \
|
||||
"s3://dpb587-assets-us-west-2/asset/$2"
|
||||
. \
|
||||
"s3://assets.dpb587.me/asset/$2/"
|
||||
|
||||
@@ -4,6 +4,22 @@
|
||||
|
||||
set -e
|
||||
|
||||
cd "$ARTIFACT_PATH"
|
||||
|
||||
cd static/
|
||||
|
||||
s3cmd sync \
|
||||
--config "$1" \
|
||||
--acl-public \
|
||||
--no-delete-removed \
|
||||
--no-preserve \
|
||||
--add-header 'cache-control:max-age=604800' \
|
||||
--verbose \
|
||||
. \
|
||||
s3://dpb587-us-west-2/static/
|
||||
|
||||
cd ../
|
||||
|
||||
s3cmd sync \
|
||||
--config "$1" \
|
||||
--acl-public \
|
||||
@@ -11,7 +27,8 @@ s3cmd sync \
|
||||
--no-preserve \
|
||||
--exclude 'private/*' \
|
||||
--exclude 'asset/*' \
|
||||
--exclude 'static/*' \
|
||||
--add-header 'cache-control:max-age=3600' \
|
||||
--verbose \
|
||||
"$ARTIFACT_PATH" \
|
||||
. \
|
||||
s3://dpb587-us-west-2
|
||||
|
||||
@@ -23,6 +23,8 @@ echo "--> building $ARTIFACT_BRANCH/$ARTIFACT_COMMIT..."
|
||||
|
||||
jekyll build --config _config.yml,_build/target/_config.yml
|
||||
|
||||
mv _build/target/artifact/static/dev _build/target/artifact/static/`echo $ARTIFACT_COMMIT | cut -c-10`
|
||||
|
||||
export ARTIFACT_PATH="$PWD/_build/target/artifact"
|
||||
|
||||
if [[ "" != "$1" ]] ; then
|
||||
|
||||
Reference in New Issue
Block a user