emblemscanner release
This commit is contained in:
parent
8c315b1c3f
commit
dc01b38085
21
Makefile
21
Makefile
@ -1,4 +1,4 @@
|
|||||||
.PHONY: FORCE
|
.PHONY: FORCE emblemscanner-release
|
||||||
|
|
||||||
IMAGE_TAG := $(shell git rev-parse --short HEAD)
|
IMAGE_TAG := $(shell git rev-parse --short HEAD)
|
||||||
IMAGE_REPO := registry.gitlab.com/euphon/themblem
|
IMAGE_REPO := registry.gitlab.com/euphon/themblem
|
||||||
@ -129,4 +129,21 @@ opencv.js: opencv/src/LICENSE FORCE
|
|||||||
--disable_single_file
|
--disable_single_file
|
||||||
|
|
||||||
alg/qrtool:
|
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
|
||||||
@ -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/camera-rules/` - Device-specific camera settings
|
||||||
- `https://themblem.com/api/v1/check-auto-torch/` - Auto torch functionality
|
- `https://themblem.com/api/v1/check-auto-torch/` - Auto torch functionality
|
||||||
- `https://whatsmyip.hondcloud.com` - IP address detection
|
- `https://whatsmyip.themblem.com` - IP address detection
|
||||||
- `https://research.themblem.com/event/` - Event tracking endpoint
|
- `https://research.themblem.com/event/` - Event tracking endpoint
|
||||||
|
|||||||
@ -43,7 +43,7 @@ App({
|
|||||||
get_real_ip() {
|
get_real_ip() {
|
||||||
this.globalData.real_ip = "0.0.0.0";
|
this.globalData.real_ip = "0.0.0.0";
|
||||||
wx.request({
|
wx.request({
|
||||||
url: "https://whatsmyip.hondcloud.com",
|
url: "https://whatsmyip.themblem.com",
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
var rip = res.data;
|
var rip = res.data;
|
||||||
console.log("my real ip:", rip);
|
console.log("my real ip:", rip);
|
||||||
|
|||||||
@ -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.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
|
// Set up zoom-in behavior when QR is found
|
||||||
this.on_first_qr_found = () => {
|
this.on_first_qr_found = () => {
|
||||||
this.log(`First QR found, zoom to ${zoom}x`);
|
this.log(`First QR found, zoom to ${zoom}x`);
|
||||||
this.camera_context.setZoom({ zoom: zoom });
|
this.camera_context.setZoom({ zoom: 6 });
|
||||||
this.setData({
|
this.setData({
|
||||||
zoom: zoom,
|
zoom: zoom,
|
||||||
qrmarkers_class: '',
|
qrmarkers_class: '',
|
||||||
|
|||||||
@ -98,7 +98,7 @@ function make_query(zoom, return_page, real_ip, tenant_id) {
|
|||||||
*/
|
*/
|
||||||
function fetch_real_ip(callback) {
|
function fetch_real_ip(callback) {
|
||||||
wx.request({
|
wx.request({
|
||||||
url: 'https://whatsmyip.hondcloud.com',
|
url: 'https://whatsmyip.themblem.com',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
const ip = res.data || '';
|
const ip = res.data || '';
|
||||||
console.log('Real IP fetched:', ip);
|
console.log('Real IP fetched:', ip);
|
||||||
@ -139,4 +139,4 @@ module.exports = {
|
|||||||
fetch_real_ip,
|
fetch_real_ip,
|
||||||
get_tenant_id,
|
get_tenant_id,
|
||||||
is_emblem_qr_pattern
|
is_emblem_qr_pattern
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user