mirror of
https://github.com/ViViDboarder/docset-sfdc.git
synced 2024-11-23 10:06:33 +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 {
|
function get_friendly_name {
|
||||||
local deliverable=$1
|
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
|
case "$deliverable" in
|
||||||
"apexcode")
|
"apexcode")
|
||||||
name="Apex"
|
name="Apex"
|
||||||
@ -34,23 +34,23 @@ function get_icon_name {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function main {
|
function main {
|
||||||
local name=$(get_friendly_name $deliverable)
|
local name=$(get_friendly_name "$deliverable")
|
||||||
local package="$out_dir/Salesforce $name.docset"
|
local package="$out_dir/Salesforce $name.docset"
|
||||||
local archive_dir="$archive_dir/Salesforce_$name"
|
local archive_dir="$archive_dir/Salesforce_$name"
|
||||||
local archive="$archive_dir/Salesforce_$name.tgz"
|
local archive="$archive_dir/Salesforce_$name.tgz"
|
||||||
local icon=$(get_icon_name $deliverable)
|
local icon=$(get_icon_name "$deliverable")
|
||||||
mkdir -p $archive_dir
|
mkdir -p "$archive_dir"
|
||||||
|
|
||||||
# Generate docset.json
|
# Generate docset.json
|
||||||
version=$(cat $build_dir/$deliverable-version.txt)
|
version=$(cat "$build_dir/$deliverable-version.txt")
|
||||||
cat $files_dir/docset-$deliverable.json | sed s/VERSION/$version/ > $archive_dir/docset.json
|
sed "s/VERSION/$version/" "$files_dir/docset-$deliverable.json" > "$archive_dir/docset.json"
|
||||||
# Generated tgz archive
|
# Generated tgz archive
|
||||||
tar --exclude=".DS_Store" -czf "$archive" "$package"
|
tar --exclude=".DS_Store" -czf "$archive" "$package"
|
||||||
# Copy icons
|
# Copy icons
|
||||||
cp "$files_dir/$icon.png" "$archive_dir/icon.png"
|
cp "$files_dir/$icon.png" "$archive_dir/icon.png"
|
||||||
cp "$files_dir/$icon@2x.png" "$archive_dir/icon@2x.png"
|
cp "$files_dir/$icon@2x.png" "$archive_dir/icon@2x.png"
|
||||||
# Copy readme
|
# 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"
|
echo "Finished archive $archive"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Salesforce Apex
|
Salesforce DOCSET_NAME
|
||||||
===============
|
===============
|
||||||
|
|
||||||
Created by [ViViDboarder](https://github.com/ViViDboarder)
|
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