emblemscanner release

This commit is contained in:
Fam Zheng 2025-09-18 10:31:42 +01:00
parent 8c315b1c3f
commit dc01b38085
5 changed files with 26 additions and 9 deletions

View File

@ -1,4 +1,4 @@
.PHONY: FORCE
.PHONY: FORCE emblemscanner-release
IMAGE_TAG := $(shell git rev-parse --short HEAD)
IMAGE_REPO := registry.gitlab.com/euphon/themblem
@ -129,4 +129,21 @@ opencv.js: opencv/src/LICENSE FORCE
--disable_single_file
alg/qrtool:
make -C alg qrtool
make -C alg qrtool
RELEASE_VERSION := $(shell git describe --tags --abbrev=0 | sed 's/^emblemscanner-//')
emblemscanner-release: build/emblemscanner-$(RELEASE_VERSION).tar.gz
build/emblemscanner-$(RELEASE_VERSION).tar.gz:
# if tree dirty or git head not tagged, error out
git diff --exit-code
if test -z "$(RELEASE_VERSION)"; then \
echo "RELEASE_VERSION is empty"; \
exit 1; \
fi
if [ $(shell git rev-parse emblemscanner-$(RELEASE_VERSION)) != $(shell git rev-parse HEAD) ]; then \
echo "git head not tagged as $(RELEASE_VERSION)"; \
exit 1; \
fi
tar -czvf build/emblemscanner-$(RELEASE_VERSION).tar.gz -C scanner pages/emblemscanner

View File

@ -59,5 +59,5 @@ This is a WeChat Mini Program project. Development is done through WeChat Develo
- `https://themblem.com/api/v1/camera-rules/` - Device-specific camera settings
- `https://themblem.com/api/v1/check-auto-torch/` - Auto torch functionality
- `https://whatsmyip.hondcloud.com` - IP address detection
- `https://research.themblem.com/event/` - Event tracking endpoint
- `https://whatsmyip.themblem.com` - IP address detection
- `https://research.themblem.com/event/` - Event tracking endpoint

View File

@ -43,7 +43,7 @@ App({
get_real_ip() {
this.globalData.real_ip = "0.0.0.0";
wx.request({
url: "https://whatsmyip.hondcloud.com",
url: "https://whatsmyip.themblem.com",
success: (res) => {
var rip = res.data;
console.log("my real ip:", rip);

View File

@ -420,12 +420,12 @@ Page({
});
this.log(`Camera set initial zoom to ${initial_zoom}x, will zoom in to ${zoom}x when QR is found`);
this.camera_context.setZoom({ zoom: initial_zoom });
this.camera_context.setZoom({ zoom: 6 });
// Set up zoom-in behavior when QR is found
this.on_first_qr_found = () => {
this.log(`First QR found, zoom to ${zoom}x`);
this.camera_context.setZoom({ zoom: zoom });
this.camera_context.setZoom({ zoom: 6 });
this.setData({
zoom: zoom,
qrmarkers_class: '',

View File

@ -98,7 +98,7 @@ function make_query(zoom, return_page, real_ip, tenant_id) {
*/
function fetch_real_ip(callback) {
wx.request({
url: 'https://whatsmyip.hondcloud.com',
url: 'https://whatsmyip.themblem.com',
success: (res) => {
const ip = res.data || '';
console.log('Real IP fetched:', ip);
@ -139,4 +139,4 @@ module.exports = {
fetch_real_ip,
get_tenant_id,
is_emblem_qr_pattern
};
};