Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating to shell based build and removing ANT build #169

Merged
merged 7 commits into from
Jan 7, 2024
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
9 changes: 2 additions & 7 deletions .github/workflows/manual-generate-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
- name: Build with build.sh
run: ./build.sh
- name: Setting date and time in env variable
run: echo "date-time-env=$(date '+%Y%m%d-%H%M%S')" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/pr-zip-generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
- name: Build with build.sh
run: ./build.sh
- name: Setting date and time in env variable
run: echo "date-time-env=$(date '+%Y%m%d-%H%M%S')" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release-zip-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml
- name: Build with build.sh
run: ./build.sh
- name: rename zips with version
run: |
mv -- generated/chrome-stt.zip generated/chrome-stt-${{ github.ref_name }}.zip
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Scroll to top and vice versa in a desktop browser. A browser extension for Chrom
## How to Run:
- The `src` folder contains all the code to be used in any Chromium browsers to load as a temporary extension.
- To debug for Firefox, use the `firefox` folder in the `generated` folder.
- You'll have to run `ant` to generate the `generated` folder.
- You'll have to run `./build.sh` to generate the `generated` folder.

## Bookmarklet
If someone does not like installing an extension. Then you can create this Bookmark in your bookmark toolbar.
Expand Down
26 changes: 26 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
GENERATED=generated

echo "Cleaning $GENERATED folder"
rm -rf $GENERATED
mkdir -p $GENERATED

echo "Building for Chrome"
cd src
zip -rq ../$GENERATED/chrome-stt.zip * -x "*.DS_Store"
cd ..

echo "Building for Firefox"
FIREFOX=$GENERATED/firefox
mkdir -p $FIREFOX
echo "Copying src to $FIREFOX folder"
cp -r src/. $FIREFOX/

echo "Manipulating files"
cd $FIREFOX
rm -f manifest.json
cp ../../resources/manifest-ff-v2.json manifest.json
sed -i '' -e 's/chrome.action./chrome.browserAction./g' background.js

zip -rq ../firefox-stt.zip * -x "*.DS_Store"
cd ../..
echo "Build Completed"
52 changes: 0 additions & 52 deletions build.xml

This file was deleted.

Binary file removed resources/htmlModifier-2.1.jar
Binary file not shown.
File renamed without changes.