Просмотр исходного кода

change appid, add fap publish script

Oliver Fabel 1 год назад
Родитель
Сommit
961525d43c
5 измененных файлов с 34 добавлено и 3 удалено
  1. 1 0
      .gitignore
  2. 4 0
      Makefile
  3. 2 2
      application.fam
  4. 26 0
      publish.sh
  5. 1 1
      upython.c

+ 1 - 0
.gitignore

@@ -4,3 +4,4 @@ dist/*
 .editorconfig
 .env
 .ufbt
+/temp

+ 4 - 0
Makefile

@@ -13,3 +13,7 @@ launch: build
 .PHONY: clean
 clean:
 	ufbt -c
+
+.PHONY: publish
+publish: build
+	./publish.sh fap-release

+ 2 - 2
application.fam

@@ -1,8 +1,8 @@
 App(
-    appid="mp_flipper_app",
+    appid="upython",
     name="uPython",
     apptype=FlipperAppType.EXTERNAL,
-    entry_point="mp_flipper_app",
+    entry_point="upython",
     stack_size=4 * 1024,
     fap_category="Tools",
     fap_version="0.5",

+ 26 - 0
publish.sh

@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+readonly BRANCH="${1}"
+readonly TARGET='./temp'
+readonly REMOTE='git@github.com:ofabel/mp-flipper.git'
+
+set -e
+
+rm -rf ${TARGET}
+
+git clone --branch ${BRANCH} --single-branch ${REMOTE} ${TARGET} || (git init -b ${BRANCH} ${TARGET} && cd ${TARGET} && git remote add origin ${REMOTE} && cd ..)
+
+rm -rf ${TARGET}/*
+
+cp upython.c application.fam icon.png *.md ${TARGET}
+cp -r ./assets ./examples ./lib ${TARGET}
+
+cd ${TARGET}
+
+git add . && git commit -m "new release" && git push origin ${BRANCH} || cd .
+
+cd ..
+
+rm -rf ${TARGET}
+
+exit 0

+ 1 - 1
mp_flipper_app.c → upython.c

@@ -68,7 +68,7 @@ static bool select_python_file(FuriString* file_path) {
     return result;
 }
 
-int32_t mp_flipper_app(void* p) {
+int32_t upython(void* p) {
     UNUSED(p);
 
     FuriString* file_path = furi_string_alloc();