mirror of
https://github.com/ViViDboarder/docset-sfdc.git
synced 2024-11-23 09:46:31 +00:00
Update archive creation to make deploying changes easier
This commit is contained in:
parent
8c7f2225b0
commit
771760f828
@ -10,7 +10,7 @@ deliverable=$1
|
||||
|
||||
function get_friendly_name {
|
||||
local deliverable=$1
|
||||
local name="$(tr '[:lower:]' '[:upper:]' <<< ${deliverable:0:1})${deliverable:1}"
|
||||
local name="$(tr '[:lower:]' '[:upper:]' <<< "${deliverable:0:1}")${deliverable:1}"
|
||||
case "$deliverable" in
|
||||
"apexcode")
|
||||
name="Apex"
|
||||
@ -34,23 +34,23 @@ function get_icon_name {
|
||||
}
|
||||
|
||||
function main {
|
||||
local name=$(get_friendly_name $deliverable)
|
||||
local name=$(get_friendly_name "$deliverable")
|
||||
local package="$out_dir/Salesforce $name.docset"
|
||||
local archive_dir="$archive_dir/Salesforce_$name"
|
||||
local archive="$archive_dir/Salesforce_$name.tgz"
|
||||
local icon=$(get_icon_name $deliverable)
|
||||
mkdir -p $archive_dir
|
||||
local icon=$(get_icon_name "$deliverable")
|
||||
mkdir -p "$archive_dir"
|
||||
|
||||
# Generate docset.json
|
||||
version=$(cat $build_dir/$deliverable-version.txt)
|
||||
cat $files_dir/docset-$deliverable.json | sed s/VERSION/$version/ > $archive_dir/docset.json
|
||||
version=$(cat "$build_dir/$deliverable-version.txt")
|
||||
sed "s/VERSION/$version/" "$files_dir/docset-$deliverable.json" > "$archive_dir/docset.json"
|
||||
# Generated tgz archive
|
||||
tar --exclude=".DS_Store" -czf "$archive" "$package"
|
||||
# Copy icons
|
||||
cp "$files_dir/$icon.png" "$archive_dir/icon.png"
|
||||
cp "$files_dir/$icon@2x.png" "$archive_dir/icon@2x.png"
|
||||
# Copy readme
|
||||
cp "$files_dir/Archive_Readme.md" "$archive_dir/README.md"
|
||||
sed "s/DOCSET_NAME/$name/" "$files_dir/Archive_Readme.md" > "$archive_dir/README.md"
|
||||
|
||||
echo "Finished archive $archive"
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
Salesforce Apex
|
||||
Salesforce DOCSET_NAME
|
||||
===============
|
||||
|
||||
Created by [ViViDboarder](https://github.com/ViViDboarder)
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user