diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..50b1590f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,72 @@ +name: Build source code and send to Capgo + +on: + push: + tags: + - '*' + +jobs: + build_android: + runs-on: ubuntu-latest + steps: + - name: Check out + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16' + - name: Install dependencies + id: install_code + run: npm ci + - name: Setup java + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '11' + - name: Build + id: build_code + run: npm run verify:android + build_ios: + runs-on: macOS-latest + steps: + - name: Check out + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16' + - name: Install dependencies + id: install_code + run: npm ci + - name: Build + id: build_code + run: npm run verify:ios + deploy: + needs: [build_android, build_ios] + runs-on: ubuntu-latest + name: 'Build code and release' + steps: + - name: Check out + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16' + - name: Install dependencies + id: install_code + run: npm ci + - name: Lint + id: lint_code + run: npm run lint + - name: Build + id: build_code + run: npm run build + - name: Verify + id: verify_code + run: npm run verify:web + - uses: JS-DevTools/npm-publish@v1 + if: "!contains(github.ref, '-alpha.')" + with: + token: ${{ secrets.NPM_TOKEN }} + - uses: JS-DevTools/npm-publish@v1 + if: "contains(github.ref, '-alpha.')" + with: + token: ${{ secrets.NPM_TOKEN }} + tag: next diff --git a/.github/workflows/bump_version.yml b/.github/workflows/bump_version.yml new file mode 100644 index 00000000..a7c8839b --- /dev/null +++ b/.github/workflows/bump_version.yml @@ -0,0 +1,35 @@ +name: Bump version + +on: + push: + branches: + - main + - development + +jobs: + bump-version: + if: "!startsWith(github.event.head_commit.message, 'chore(release):')" + runs-on: ubuntu-latest + name: "Bump version and create changelog with standard version" + steps: + - name: Check out + uses: actions/checkout@v2 + with: + fetch-depth: 0 + token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' + - name: Git config + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + - name: Create bump and changelog main + if: github.ref == 'refs/heads/main' + run: npx standard-version + - name: Create bump and changelog development + if: github.ref != 'refs/heads/main' + run: npx standard-version --prerelease alpha + - name: Push to origin + run: | + CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" + git pull $remote_repo $CURRENT_BRANCH + git push $remote_repo HEAD:$CURRENT_BRANCH --follow-tags --tags diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ec70c0b..0f43827b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,29 +1,109 @@ # Changelog -## [4.0.0](https://github.com/capacitor-community/camera-preview/compare/v3.1.2...v4.0.0) (2022-09-20) +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### Changed -* Capacitor 4 is **required**. Thanks to @rdlabo for the patch and @EinfachHans for testing. +### [3.3.1](https://github.com/Cap-go/camera-preview/compare/v3.3.0...v3.3.1) (2022-11-11) -## [3.1.2](https://github.com/capacitor-community/camera-preview/compare/v3.1.1...v3.1.2) (2022-08-29) -### Fixed -* [Android] preview not resized and displayed correctly when orientation changes by @ryaa in https://github.com/capacitor-community/camera-preview/pull/238 +### Bug Fixes -## [3.1.1](https://github.com/capacitor-community/camera-preview/compare/v3.1.0...v3.1.1) (2022-08-13) +* build script ([87d1145](https://github.com/Cap-go/camera-preview/commit/87d1145c396f36a1cea49161adef85bb761969a0)) -### Added -* feat: respect width, height and quality options on the web implementation by @julian-baumann in https://github.com/capacitor-community/camera-preview/pull/231 +## [3.3.0](https://github.com/Cap-go/camera-preview/compare/v3.2.8...v3.3.0) (2022-11-11) -### Changed -* chore(deps): bump eventsource from 1.0.7 to 1.1.1 in /demo by @dependabot in https://github.com/capacitor-community/camera-preview/pull/226 -* chore(deps): bump terser from 4.8.0 to 4.8.1 in /demo by @dependabot in https://github.com/capacitor-community/camera-preview/pull/239 -### Fixed -* bugfix: fixed resource android:attr/lStar not found build error by @ryaa in https://github.com/capacitor-community/camera-preview/pull/229 -* Fix wrong return type on `flip` and `setFlashMode` by @diesieben07 in https://github.com/capacitor-community/camera-preview/pull/234 -* doc: update the web instructions by @riderx in https://github.com/capacitor-community/camera-preview/pull/245 -* bugfix: fixed the problem when photos taken in the landscape orientation are off by @ryaa in https://github.com/capacitor-community/camera-preview/pull/235 +### Features + +* add native build in CI ([be90972](https://github.com/Cap-go/camera-preview/commit/be9097244e91e4409c65751b3829ab270bacd700)) + +### [3.2.8](https://github.com/Cap-go/camera-preview/compare/v3.2.7...v3.2.8) (2022-11-11) + + +### Bug Fixes + +* readme ([73294f8](https://github.com/Cap-go/camera-preview/commit/73294f8cacf78d1494c60ea2d01083b57baa4147)) + +### [3.2.7](https://github.com/Cap-go/camera-preview/compare/v3.2.6...v3.2.7) (2022-11-11) + + +### Bug Fixes + +* readme ([5600e01](https://github.com/Cap-go/camera-preview/commit/5600e010e7a94fda9b21910bc41c3a5ef0cd3a43)) + +### [3.2.6](https://github.com/Cap-go/camera-preview/compare/v3.2.5...v3.2.6) (2022-11-07) + + +### Bug Fixes + +* readme ([4c681d7](https://github.com/Cap-go/camera-preview/commit/4c681d77828e65ce3525e5245aeddf850fede9b2)) + +### [3.2.5](https://github.com/Cap-go/camera-preview/compare/v3.2.4...v3.2.5) (2022-08-03) + +### [3.2.4](https://github.com/Cap-go/camera-preview/compare/v3.2.3...v3.2.4) (2022-08-03) + +### [3.2.3](https://github.com/Cap-go/camera-preview/compare/v3.2.2...v3.2.3) (2022-08-03) + + +### Bug Fixes + +* publishing ([3c14f61](https://github.com/Cap-go/camera-preview/commit/3c14f61562068fe18ede136088e8e205d37974d9)) + +### [3.2.2](https://github.com/capacitor-community/camera-preview/compare/v3.2.1...v3.2.2) (2022-08-03) + + +### Bug Fixes + +* path ([d9a6dea](https://github.com/capacitor-community/camera-preview/commit/d9a6dea1fc1163add3a37aea93f4d5dc57020257)) + +### [3.2.1](https://github.com/capacitor-community/camera-preview/compare/v3.2.0...v3.2.1) (2022-08-03) + + +### Bug Fixes + +* CI ([201dfd7](https://github.com/capacitor-community/camera-preview/commit/201dfd713c9791d6163d495cb1a60d8d83c291b0)) + +## 3.2.0 (2022-08-03) + + +### Features + +* add toBack, x and y to iOS ([d3921b0](https://github.com/capacitor-community/camera-preview/commit/d3921b0083626e8fa66972ff9ffa90981a7702ca)) +* **android:** add maxDuration and withFlash options when capturing videos ([9b09006](https://github.com/capacitor-community/camera-preview/commit/9b09006bc7cf4ea924b3857f94934c69ca8c2330)) +* **android:** add video support for android ([e934cbe](https://github.com/capacitor-community/camera-preview/commit/e934cbe031dc839d724e7ba8eb651990179c5490)) +* export thumbnail image together with original image ([0a7ed75](https://github.com/capacitor-community/camera-preview/commit/0a7ed759b374f69991edb4533d82b61a5ebaeee8)) +* set resolution the same with native camera ([a027dc1](https://github.com/capacitor-community/camera-preview/commit/a027dc1e813d27e9ca6f16923327579ecceb9073)) +* support detect orientation by accelerometer ([1b3a91e](https://github.com/capacitor-community/camera-preview/commit/1b3a91eb8ba950246e7bcccf6668866dcbcbd102)) + + +### Bug Fixes + +* [#131](https://github.com/capacitor-community/camera-preview/issues/131) paddingBottom param is not working properly under iOS ([0994ecf](https://github.com/capacitor-community/camera-preview/commit/0994ecf3c1d41fe0c0a4139e8f52fb5815a1e181)) +* add CI ([cd835bd](https://github.com/capacitor-community/camera-preview/commit/cd835bdf88e8d9d9e257f52fbdfd9c4839aabbe3)) +* add origin (x,y) to startCamera ([e4d8db0](https://github.com/capacitor-community/camera-preview/commit/e4d8db016fd9bfb947072d28fd378a9fb96c2602)) +* amend orientation to support faceUp and faceDown ([96891e5](https://github.com/capacitor-community/camera-preview/commit/96891e5e9cd4511b67296f08ca9bf9f91da8ccfd)) +* android landscape orientation of clicked images ([3d87702](https://github.com/capacitor-community/camera-preview/commit/3d8770273143b836a591c280f219b058fca075bc)) +* **android:** add toBack boolean to startCamera ([ca9d9c2](https://github.com/capacitor-community/camera-preview/commit/ca9d9c20ff489ae9e7957d89621f182145a79a50)) +* calculate quality correctly ([8f609f0](https://github.com/capacitor-community/camera-preview/commit/8f609f00aa20f63c7fdb28cbfcc3e5cc342b6184)) +* **CameraPreviewWeb:** remove video element from parent ([20bae4b](https://github.com/capacitor-community/camera-preview/commit/20bae4bc5c873b1915f2a9f51acfa6c711870472)) +* compressionQuality is between 0 and 1 in jpegData ([107ab67](https://github.com/capacitor-community/camera-preview/commit/107ab6703280a3e66999986a9b0b2a1f20b44fb3)) +* correct the pod name ([b12c350](https://github.com/capacitor-community/camera-preview/commit/b12c35044b9a1bc4403d40645010acc569f24be3)) +* **docs:** typo ([a4f4072](https://github.com/capacitor-community/camera-preview/commit/a4f4072ca6f3d25b61be3725d4d37ea4669e6b7f)) +* don't handle rotate if current orientation is portraitUpsideDown ([0313d04](https://github.com/capacitor-community/camera-preview/commit/0313d04e4399d4b52a3ccff1ab211b93acd4b9ee)) +* fix webcam image to be lateral inverted ([85f8c67](https://github.com/capacitor-community/camera-preview/commit/85f8c67139afe131815a4f16036b4e83a8217992)) +* implemented a fix for [#131](https://github.com/capacitor-community/camera-preview/issues/131) paddingBottom param is not working under iOS ([ac63599](https://github.com/capacitor-community/camera-preview/commit/ac63599fd4ea55dd7bce442c40d7f11775d03ba2)) +* **iOS:** add permission check and reject call ([a03426a](https://github.com/capacitor-community/camera-preview/commit/a03426adb381fc501408a3864b511180adf0659a)) +* issue in rotate event when opening camera from landscape mode ([f1d98ae](https://github.com/capacitor-community/camera-preview/commit/f1d98aedc7635f396e743bf0f62e74c14aca2704)) +* issue when rotate to landscape first after that rotate to portrait upside down ([4a1c77d](https://github.com/capacitor-community/camera-preview/commit/4a1c77d23f816a123f18b17c1e409049858ac888)) +* lateral invert it for front camera ([efe595e](https://github.com/capacitor-community/camera-preview/commit/efe595e168d3ac9082f32bb27ae28ede52d5f328)) +* not call rotated when the app state is inactive or background ([83d204d](https://github.com/capacitor-community/camera-preview/commit/83d204dcb054137a08632c114e7603ec31a6f3a6)) +* Prevent plugin to use audio permission https://github.com/capacitor-community/camera-preview/issues/65 ([3bff45f](https://github.com/capacitor-community/camera-preview/commit/3bff45f7e449779f1b6b67de19023faf00053149)) +* Prevent plugin to use audio permission https://github.com/capacitor-community/camera-preview/issues/65 ([f13832d](https://github.com/capacitor-community/camera-preview/commit/f13832d5bacba25218444533d882ad2c387c9044)) +* removed WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE permissions ([04af318](https://github.com/capacitor-community/camera-preview/commit/04af318583dd28cd86915f1f1a245616f7026b9f)) +* revert useless upgrade of min version ([bbf4092](https://github.com/capacitor-community/camera-preview/commit/bbf4092b27d418dce609ba8fb150a3f5d943329b)) +* scale thumbnail image by width. ([1e07b1d](https://github.com/capacitor-community/camera-preview/commit/1e07b1dbf9d6479fb6240dff6675a63511aa1c3a)) +* **web.ts:** reject promise if permission is not granted ([2af9355](https://github.com/capacitor-community/camera-preview/commit/2af9355f33a612c4d53d427fa4a834d2b7acf871)) +* wrong property name of ImageResult (on Android) ([d3783ec](https://github.com/capacitor-community/camera-preview/commit/d3783ecc8066aab334bec6d0453369dcd4133641)) +* wrong typo self.orientation ([b589307](https://github.com/capacitor-community/camera-preview/commit/b589307a96c11a00e96580ed87ba15025ae6e30e)) ## [3.1.0](https://github.com/capacitor-community/camera-preview/compare/v3.0.0...v3.1.0) (2022-05-27) @@ -34,7 +114,7 @@ ### Changed * chore(deps): bump async from 2.6.3 to 2.6.4 in /demo ([#217](https://github.com/capacitor-community/camera-preview/pull/217)) -* chore(deps): bump minimist from 1.2.5 to 1.2.6 ([#225](https://github.com/capacitor-community/camera-preview/pull/225)) +* chore(deps): bump minimist from 1.2.5 to 1.2.6 ([#225](https://github.com/capacitor-community/camera-preview/pull/225)) ### Fixed @@ -58,6 +138,6 @@ The version number has increased in line with Semver as there's one backwards-in * Add pinch and zoom support on iOS. Thank you to contributors @luckyboykg and @guischulz! ([#204](https://github.com/capacitor-community/camera-preview/pull/204)) ### Documentation -* Add info on styling when the camera preview doesn't display because it's behind elements. Thank you to contributor @dhayanth-dharma! +* Add info on styling when the camera preview doesn't display because it's behind elements. Thank you to contributor @dhayanth-dharma! * Fix deprecated imports in README. Thank you to contributor @koen20! * Document the iOS-only `enableHighResolution` option. Thank you to contributor @bfinleyui! ([#207](https://github.com/capacitor-community/camera-preview/pull/207)) \ No newline at end of file diff --git a/CapacitorCommunityCameraPreview.podspec b/CapgoCameraPreview.podspec similarity index 56% rename from CapacitorCommunityCameraPreview.podspec rename to CapgoCameraPreview.podspec index 3cdae35c..3f85e2a4 100644 --- a/CapacitorCommunityCameraPreview.podspec +++ b/CapgoCameraPreview.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| - s.name = 'CapacitorCommunityCameraPreview' + s.name = 'CapgoCameraPreview' s.version = '2.0.0' s.summary = 'Camera preview' s.license = 'MIT' - s.homepage = 'https://github.com/capacitor-community/camera-preview.git' + s.homepage = 'https://github.com/Cap-go/camera-preview.git' s.author = 'Ariel Hernandez Musa' - s.source = { :git => 'https://github.com/capacitor-community/camera-preview.git', :tag => s.version.to_s } + s.source = { :git => 'https://github.com/Cap-go/camera-preview.git', :tag => s.version.to_s } s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}' s.ios.deployment_target = '13.0' s.dependency 'Capacitor' diff --git a/README.md b/README.md index debaf657..463e7c26 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

@capacitor-community/camera-preview
@capgo/camera-preview
CAPACITOR 4