]> git.lizzy.rs Git - micro.git/blobdiff - snapcraft.yaml
Add autoretab
[micro.git] / snapcraft.yaml
index 8475e7570c9a9f1ccd0f6cb4197d13a2a165e332..e5ac0d18e1b7f38505a3ce10ba012cc953dc094c 100644 (file)
@@ -1,11 +1,11 @@
 name: micro
-version: master
 summary: A modern and intuitive terminal-based text editor
 description: |
   Micro is a terminal-based text editor that aims to be easy to use and
   intuitive, while also taking advantage of the full capabilities of modern
   terminals.
 confinement: classic
+adopt-info: micro
 
 apps:
   micro:
@@ -14,6 +14,18 @@ apps:
 parts:
   micro:
     source: .
-    plugin: go
-    go-importpath: github.com/zyedidia/micro
-    go-packages: [github.com/zyedidia/micro/cmd/micro]
\ No newline at end of file
+    source-type: git
+    plugin: nil
+    build-packages: [make]
+    build-snaps: [go]
+    build-attributes: [no-patchelf]
+    override-pull: |
+      snapcraftctl pull
+      version="$(go run $SNAPCRAFT_PART_SRC/tools/build-version.go)"
+      [ -n "$(echo $version | grep "dev")" ] && grade=devel || grade=stable
+      snapcraftctl set-version "$version"
+      snapcraftctl set-grade "$grade"
+    override-build: |
+      make build-tags
+      mkdir $SNAPCRAFT_PART_INSTALL/bin
+      mv ./micro $SNAPCRAFT_PART_INSTALL/bin/