Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scripts/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ bash ./scripts/copy_common.sh $DES
cp platform_spec/chromium/manifest.json $DES

cd $DES
commit_num=$(git rev-list HEAD --count)

if [[ $# -eq 0 ]]; then
echo "*** FastForward.Chromium: Creating dev package... (Tip: Use nover to create a no-version package)"
bash ../../scripts/version.sh manifest.json 0
zip -qr ../$(basename $DIST)/FastForward_chromium_$(git shortlog | grep -E '^[ ]+\w+' | wc -l)_dev.zip .
zip -qr ../$(basename $DIST)/FastForward_chromium_${commit_num}_dev.zip .

elif [ "$1" == "nover" ] ; then
echo "*** FastForward.Chromium: Creating non-versioned package... "
rm injection_script.js
rm rules.json
bash ../../scripts/version.sh manifest.json nover
zip -qr ../$(basename $DIST)/FastForward_chromium_0.$(git shortlog | grep -E '^[ ]+\w+' | wc -l).zip .
zip -qr ../$(basename $DIST)/FastForward_chromium_0.${commit_num}.zip .

elif [ "$1" == "ver" ]; then
echo "*** FastForward.Chromium: Creating versioned package... "
Expand Down
5 changes: 3 additions & 2 deletions scripts/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ bash ./scripts/copy_common.sh $DES
cp platform_spec/firefox/manifest.json $DES

cd $DES
commit_num=$(git rev-list HEAD --count)

if [[ $# -eq 0 ]]; then
echo "*** FastForward.firefox: Creating dev package... (Tip: Use nover to create a no-version package)"
bash ../../scripts/version.sh manifest.json 0
zip -qr ../$(basename $DIST)/FastForward_firefox_$(git shortlog | grep -E '^[ ]+\w+' | wc -l)_dev.xpi .
zip -qr ../$(basename $DIST)/FastForward_firefox_${commit_num}_dev.xpi .

elif [ "$1" == "nover" ] ; then
echo "*** FastForward.firefox: Creating non-versioned package... "
rm injection_script.js
rm rules.json
bash ../../scripts/version.sh manifest.json nover
zip -qr ../$(basename $DIST)/FastForward_firefox_0.$(git shortlog | grep -E '^[ ]+\w+' | wc -l).xpi .
zip -qr ../$(basename $DIST)/FastForward_firefox_0.$commit_num.xpi .

elif [ "$1" == "ver" ]; then
echo "*** FastForward.firefox: Creating versioned package... "
Expand Down
5 changes: 3 additions & 2 deletions scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
set -e

manifest_loc=$1
commit_num=$(git rev-list HEAD --count)


if [[ $# -lt 2 ]]; then #Creates a normal versioned json using only version.txt
Expand All @@ -15,13 +16,13 @@ if [[ $# -lt 2 ]]; then #Creates a normal versioned json using only version.txt

elif [ "$2" = "nover" ]; then #Creates a non-versioned json using only number of commits

version="0.$(git shortlog | grep -E '^[ ]+\w+' | wc -l)"
version="0.$commit_num"
sed -i '/"version":/c\ "version": "'$version'",' $1
echo vesrioned $(basename $1) to $version

else #Creates a json using the number of commits and appends the second argument to it

version="0.$(git shortlog | grep -E '^[ ]+\w+' | wc -l).$2"
version="0.$commit_num.$2"
sed -i '/"version":/c\ "version": "'$version'",' $1
echo vesrioned $(basename $1) to $version
fi
Expand Down