Refactor Info.plist creation in release workflows for improved readability
- Replaced the heredoc syntax with echo commands to create the Info.plist file in both release-complex.yml and release-simplified.yml. - This change enhances clarity and maintainability of the plist generation process.
This commit is contained in:
38
.github/workflows/release-complex.yml
vendored
38
.github/workflows/release-complex.yml
vendored
@@ -176,26 +176,24 @@ jobs:
|
|||||||
else
|
else
|
||||||
# Create a basic Info.plist
|
# Create a basic Info.plist
|
||||||
VERSION_NUM=$(echo "${{ needs.validate-and-prepare.outputs.tag_name }}" | sed 's/^v//')
|
VERSION_NUM=$(echo "${{ needs.validate-and-prepare.outputs.tag_name }}" | sed 's/^v//')
|
||||||
cat > "Yaze.app/Contents/Info.plist" <<EOF
|
echo '<?xml version="1.0" encoding="UTF-8"?>' > "Yaze.app/Contents/Info.plist"
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >> "Yaze.app/Contents/Info.plist"
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
echo '<plist version="1.0">' >> "Yaze.app/Contents/Info.plist"
|
||||||
<plist version="1.0">
|
echo '<dict>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<dict>
|
echo '<key>CFBundleExecutable</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleExecutable</key>
|
echo '<string>yaze</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>yaze</string>
|
echo '<key>CFBundleIdentifier</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleIdentifier</key>
|
echo '<string>com.yaze.editor</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>com.yaze.editor</string>
|
echo '<key>CFBundleName</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleName</key>
|
echo '<string>Yaze</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>Yaze</string>
|
echo '<key>CFBundleVersion</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleVersion</key>
|
echo "<string>$VERSION_NUM</string>" >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>$VERSION_NUM</string>
|
echo '<key>CFBundleShortVersionString</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleShortVersionString</key>
|
echo "<string>$VERSION_NUM</string>" >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>$VERSION_NUM</string>
|
echo '<key>CFBundlePackageType</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundlePackageType</key>
|
echo '<string>APPL</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>APPL</string>
|
echo '</dict>' >> "Yaze.app/Contents/Info.plist"
|
||||||
</dict>
|
echo '</plist>' >> "Yaze.app/Contents/Info.plist"
|
||||||
</plist>
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
38
.github/workflows/release-simplified.yml
vendored
38
.github/workflows/release-simplified.yml
vendored
@@ -345,26 +345,24 @@ jobs:
|
|||||||
cp -r assets "Yaze.app/Contents/Resources/" 2>/dev/null || echo "assets directory not found"
|
cp -r assets "Yaze.app/Contents/Resources/" 2>/dev/null || echo "assets directory not found"
|
||||||
# Create Info.plist with correct version
|
# Create Info.plist with correct version
|
||||||
VERSION_NUM=$(echo "${{ needs.validate-and-prepare.outputs.tag_name }}" | sed 's/^v//')
|
VERSION_NUM=$(echo "${{ needs.validate-and-prepare.outputs.tag_name }}" | sed 's/^v//')
|
||||||
cat > "Yaze.app/Contents/Info.plist" <<EOF
|
echo '<?xml version="1.0" encoding="UTF-8"?>' > "Yaze.app/Contents/Info.plist"
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
echo '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">' >> "Yaze.app/Contents/Info.plist"
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
echo '<plist version="1.0">' >> "Yaze.app/Contents/Info.plist"
|
||||||
<plist version="1.0">
|
echo '<dict>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<dict>
|
echo '<key>CFBundleExecutable</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleExecutable</key>
|
echo '<string>yaze</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>yaze</string>
|
echo '<key>CFBundleIdentifier</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleIdentifier</key>
|
echo '<string>com.yaze.editor</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>com.yaze.editor</string>
|
echo '<key>CFBundleName</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleName</key>
|
echo '<string>Yaze</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>Yaze</string>
|
echo '<key>CFBundleVersion</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleVersion</key>
|
echo "<string>$VERSION_NUM</string>" >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>$VERSION_NUM</string>
|
echo '<key>CFBundleShortVersionString</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundleShortVersionString</key>
|
echo "<string>$VERSION_NUM</string>" >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>$VERSION_NUM</string>
|
echo '<key>CFBundlePackageType</key>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<key>CFBundlePackageType</key>
|
echo '<string>APPL</string>' >> "Yaze.app/Contents/Info.plist"
|
||||||
<string>APPL</string>
|
echo '</dict>' >> "Yaze.app/Contents/Info.plist"
|
||||||
</dict>
|
echo '</plist>' >> "Yaze.app/Contents/Info.plist"
|
||||||
</plist>
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create DMG
|
# Create DMG
|
||||||
|
|||||||
Reference in New Issue
Block a user