From de02724219c72c6f1deb358c934d05a2e5e9f5c7 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:07:44 +0000 Subject: [PATCH 01/57] Add .gitlab-ci.yml --- .gitlab-ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f7eb815 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,50 @@ +image: rabis/qt:5.9-desktop + +before_script: + - sudo apt install --no-install-recommends upx zip + - qmake --version + - ./scripts/configure_ubuntu.sh + +build ubuntu x86_64: + stage: build + tags: + - ubuntu + - x86_64 + script: + - qmake + - make -j4 + - upx --lzma -9 --force bin/Attorney_Online + +deploy: + stage: deploy + tags: + - ubuntu + - x86_64 + script: + - mkdir artifact + - cd artifact + + # Base folder + - mkdir base + - mkdir base/themes + - cp -a ../base/themes/default base/themes/ + - cp -a ../base/config.ini base/config.sample.ini + - cp -a ../base/serverlist.txt base/serverlist.sample.txt + + # Miscellaneous files + - cp -a ../README.md README.md.txt + - cp -a ../LICENSE.MIT LICENSE.txt + + # Shared libraries + - cp -a ../lib/* . + + # Platform-specific + - cp -a ../bin/Attorney_Online . + - echo "#!/bin/sh" >> ./run.sh + - echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh + - chmod +x ./run.sh + + # Zipping + # zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip . + - tar cavf Attorney_Online_$(git describe --tags)_x64.tar.xz * + - echo "Deployment completed - can we move on with the script now?" \ No newline at end of file From 429b55227e0c9b5fba05c89e02ed39953ba4589b Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:19:17 +0000 Subject: [PATCH 02/57] Fix tags in .gitlab-ci.yml --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f7eb815..c3bff37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,10 +5,10 @@ before_script: - qmake --version - ./scripts/configure_ubuntu.sh -build ubuntu x86_64: +build linux x86_64: stage: build tags: - - ubuntu + - linux - x86_64 script: - qmake @@ -18,7 +18,7 @@ build ubuntu x86_64: deploy: stage: deploy tags: - - ubuntu + - linux - x86_64 script: - mkdir artifact From c3e75f205f076f7a87e10942c24b4272cca833cd Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:22:33 +0000 Subject: [PATCH 03/57] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3bff37..e4176f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,8 +8,8 @@ before_script: build linux x86_64: stage: build tags: + - docker - linux - - x86_64 script: - qmake - make -j4 @@ -18,8 +18,8 @@ build linux x86_64: deploy: stage: deploy tags: + - docker - linux - - x86_64 script: - mkdir artifact - cd artifact From deee5aad76e1e626a529a1480d94a1c4510d2055 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:23:06 +0000 Subject: [PATCH 04/57] Fix Docker image name in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4176f7..aaaecdd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: rabis/qt:5.9-desktop +image: rabits/qt:5.9-desktop before_script: - sudo apt install --no-install-recommends upx zip From 0f61d8fcee9b4dda16a9851cd1fa6661b060240e Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:25:01 +0000 Subject: [PATCH 05/57] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aaaecdd..15f039c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: rabits/qt:5.9-desktop before_script: - - sudo apt install --no-install-recommends upx zip + - sudo apt-get install --no-install-recommends -y upx zip - qmake --version - ./scripts/configure_ubuntu.sh From 9f816e16fd59dc0d84b0f8e2c19e6cedc3971e24 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:26:41 +0000 Subject: [PATCH 06/57] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 15f039c..696ea52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ image: rabits/qt:5.9-desktop before_script: - - sudo apt-get install --no-install-recommends -y upx zip + - sudo apt-get install --no-install-recommends -y upx zip unzip - qmake --version - ./scripts/configure_ubuntu.sh From a37212ae7cc483220dc3790fb8800c0a009adce2 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:29:21 +0000 Subject: [PATCH 07/57] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 696ea52..01ee7da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: rabits/qt:5.9-desktop before_script: - sudo apt-get install --no-install-recommends -y upx zip unzip - qmake --version + - mkdir lib - ./scripts/configure_ubuntu.sh build linux x86_64: From 15247eeb767f35b9257c69335482c0676e982498 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:33:22 +0000 Subject: [PATCH 08/57] Update .gitlab-ci.yml --- .gitlab-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 01ee7da..9381c87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,12 @@ image: rabits/qt:5.9-desktop before_script: - - sudo apt-get install --no-install-recommends -y upx zip unzip + - echo Current working directory is $(pwd) - qmake --version - - mkdir lib - - ./scripts/configure_ubuntu.sh + - sudo apt-get install --no-install-recommends -y upx zip unzip + - cd scripts + - ./configure_ubuntu.sh + - cd .. build linux x86_64: stage: build From 291206587013c1c565563cb630d5ab0db2281b63 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:44:27 +0000 Subject: [PATCH 09/57] Update .gitlab-ci.yml --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9381c87..533533f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: rabits/qt:5.9-desktop before_script: - echo Current working directory is $(pwd) - qmake --version + - gcc --version - sudo apt-get install --no-install-recommends -y upx zip unzip - cd scripts - ./configure_ubuntu.sh From 4860be3cdf27662a27bc732ddf120b0301aa0663 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:43:57 +0000 Subject: [PATCH 10/57] Update Attorney_Online.pro for C++14 (cherry picked from commit 032ba33ecff1b108fb1c12d06c14e26d86b21a60) --- Attorney_Online.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Attorney_Online.pro b/Attorney_Online.pro index 39366c0..c0bc4ab 100644 --- a/Attorney_Online.pro +++ b/Attorney_Online.pro @@ -14,7 +14,7 @@ SOURCES += $$files($$PWD/src/*.cpp) HEADERS += $$files($$PWD/include/*.h) LIBS += -L$$PWD/lib -lbass -ldiscord-rpc -CONFIG += c++11 +CONFIG += c++14 RESOURCES += resources.qrc From 9008ec8d9d41e8ce523ecad5ad310fed2dfb3d8c Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 02:49:00 +0000 Subject: [PATCH 11/57] Remove constexpr from aoapplication.h --- include/aoapplication.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/aoapplication.h b/include/aoapplication.h index 44aef7a..e698030 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -94,9 +94,9 @@ public: //////////////////versioning/////////////// - constexpr int get_release() const { return RELEASE; } - constexpr int get_major_version() const { return MAJOR_VERSION; } - constexpr int get_minor_version() const { return MINOR_VERSION; } + int get_release() const { return RELEASE; } + int get_major_version() const { return MAJOR_VERSION; } + int get_minor_version() const { return MINOR_VERSION; } QString get_version_string(); /////////////////////////////////////////// From 21c9632de0e7132013291c22bff9117fac4f6c70 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Mon, 21 Jan 2019 03:06:30 +0000 Subject: [PATCH 12/57] Add cache and artifacts to .gitlab-ci.yml --- .gitlab-ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 533533f..b9c966d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,10 @@ image: rabits/qt:5.9-desktop +cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - lib/ + before_script: - echo Current working directory is $(pwd) - qmake --version @@ -18,9 +23,14 @@ build linux x86_64: - qmake - make -j4 - upx --lzma -9 --force bin/Attorney_Online + artifacts: + paths: + - bin/ deploy: stage: deploy + dependencies: + - build linux x86_64 tags: - docker - linux @@ -50,5 +60,10 @@ deploy: # Zipping # zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip . - - tar cavf Attorney_Online_$(git describe --tags)_x64.tar.xz * - - echo "Deployment completed - can we move on with the script now?" \ No newline at end of file + - mkdir ../zip + - tar cavf ../zip/Attorney_Online_$(git describe --tags)_x64.tar.xz * + - sha1sum ../zip/* + + artifacts: + paths: + - zip/ \ No newline at end of file From 9c895ae6c4410f6b352986481f47cff59993a819 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Fri, 25 Jan 2019 02:13:49 +0000 Subject: [PATCH 13/57] Add Windows static target to .gitlab-ci.yml (incomplete) --- .gitlab-ci.yml | 73 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9c966d..f1ba670 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,3 @@ -image: rabits/qt:5.9-desktop - cache: key: ${CI_COMMIT_REF_SLUG} paths: @@ -15,6 +13,7 @@ before_script: - cd .. build linux x86_64: + image: rabits/qt:5.9-desktop stage: build tags: - docker @@ -27,7 +26,35 @@ build linux x86_64: paths: - bin/ -deploy: +build windows i686: + image: fffaraz/qt + stage: build + tags: + - docker + - linux + script: + - qmake + - make -j4 + - upx --lzma -9 --force bin/Attorney_Online.exe + +# Base folder +.deploy_base: &deploy_base + - mkdir base + - mkdir base/themes + - cp -a ../base/themes/default base/themes/ + - cp -a ../base/config.ini base/config.sample.ini + - cp -a ../base/serverlist.txt base/serverlist.sample.txt + +# Miscellaneous files +.deploy_misc: &deploy_misc + - cp -a ../README.md README.md.txt + - cp -a ../LICENSE.MIT LICENSE.txt + +# Shared libraries +.deploy_libs: &deploy_libs + - cp -a ../lib/* . + +deploy linux: stage: deploy dependencies: - build linux x86_64 @@ -37,20 +64,9 @@ deploy: script: - mkdir artifact - cd artifact - - # Base folder - - mkdir base - - mkdir base/themes - - cp -a ../base/themes/default base/themes/ - - cp -a ../base/config.ini base/config.sample.ini - - cp -a ../base/serverlist.txt base/serverlist.sample.txt - - # Miscellaneous files - - cp -a ../README.md README.md.txt - - cp -a ../LICENSE.MIT LICENSE.txt - - # Shared libraries - - cp -a ../lib/* . + - *deploy_base + - *deploy_misc + - *deploy_libs # Platform-specific - cp -a ../bin/Attorney_Online . @@ -63,7 +79,30 @@ deploy: - mkdir ../zip - tar cavf ../zip/Attorney_Online_$(git describe --tags)_x64.tar.xz * - sha1sum ../zip/* + artifacts: + paths: + - zip/ +deploy windows: + stage: deploy + dependencies: + - build windows i686 + tags: + - docker + - linux + script: + - mkdir artifact + - cd artifact + - *deploy_base + - *deploy_misc + - *deploy_libs + + # Platform-specific + - cp -a ../bin/Attorney_Online.exe . + + # Zipping + # -r: recursive; -9: max compression; -l: convert to CR LF + - zip -r -9 -l Attorney_Online_$(git describe --tags)_windows_i386.zip . artifacts: paths: - zip/ \ No newline at end of file From 5fa37e2557513550ab747f2a15a58bb4a7d130b7 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 20:45:28 +0000 Subject: [PATCH 14/57] Try to fix anchors in .gitlab-ci.yml --- .gitlab-ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1ba670..13f091d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,21 +38,21 @@ build windows i686: - upx --lzma -9 --force bin/Attorney_Online.exe # Base folder -.deploy_base: &deploy_base - - mkdir base - - mkdir base/themes - - cp -a ../base/themes/default base/themes/ - - cp -a ../base/config.ini base/config.sample.ini - - cp -a ../base/serverlist.txt base/serverlist.sample.txt +.deploy_base: &deploy_base | + mkdir base + mkdir base/themes + cp -a ../base/themes/default base/themes/ + cp -a ../base/config.ini base/config.sample.ini + cp -a ../base/serverlist.txt base/serverlist.sample.txt # Miscellaneous files -.deploy_misc: &deploy_misc - - cp -a ../README.md README.md.txt - - cp -a ../LICENSE.MIT LICENSE.txt +.deploy_misc: &deploy_misc | + cp -a ../README.md README.md.txt + cp -a ../LICENSE.MIT LICENSE.txt # Shared libraries -.deploy_libs: &deploy_libs - - cp -a ../lib/* . +.deploy_libs: &deploy_libs | + cp -a ../lib/* . deploy linux: stage: deploy From 8a5be72f913b75403387485e299ea306a81c24e9 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 20:47:41 +0000 Subject: [PATCH 15/57] Don't use sudo in .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 13f091d..b40d525 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ before_script: - echo Current working directory is $(pwd) - qmake --version - gcc --version - - sudo apt-get install --no-install-recommends -y upx zip unzip + - apt-get install --no-install-recommends -y upx zip unzip - cd scripts - ./configure_ubuntu.sh - cd .. From 72dbc4f3ae160d273649f6596ee12221f47a4003 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 22:42:47 +0000 Subject: [PATCH 16/57] Use a locally-sourced image for Windows builds --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b40d525..198ceab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,9 +5,10 @@ cache: before_script: - echo Current working directory is $(pwd) + - echo Current user is $(whoami) - qmake --version - gcc --version - - apt-get install --no-install-recommends -y upx zip unzip + - sudo apt-get install --no-install-recommends -y upx zip unzip - cd scripts - ./configure_ubuntu.sh - cd .. @@ -27,7 +28,7 @@ build linux x86_64: - bin/ build windows i686: - image: fffaraz/qt + image: ${CI_REGISTRY_IMAGE}/builder-windows-i686 stage: build tags: - docker From 565f18352424d89ef0ab02ec9b3a12b5c7e703be Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 22:50:14 +0000 Subject: [PATCH 17/57] Remove version commands from before_script --- .gitlab-ci.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 198ceab..f8974a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,13 +5,7 @@ cache: before_script: - echo Current working directory is $(pwd) - - echo Current user is $(whoami) - - qmake --version - - gcc --version - sudo apt-get install --no-install-recommends -y upx zip unzip - - cd scripts - - ./configure_ubuntu.sh - - cd .. build linux x86_64: image: rabits/qt:5.9-desktop @@ -20,6 +14,13 @@ build linux x86_64: - docker - linux script: + - qmake --version + - gcc --version + + - cd scripts + - ./configure_ubuntu.sh + - cd .. + - qmake - make -j4 - upx --lzma -9 --force bin/Attorney_Online @@ -34,8 +35,18 @@ build windows i686: - docker - linux script: + # Extract BASS + - mkdir bass + - curl http://www.un4seen.com/files/bass24.zip -o bass.zip + - unzip bass.zip + - cp bass.dll ../../lib + - cd .. + + # Build - qmake - make -j4 + + # Post-processing - upx --lzma -9 --force bin/Attorney_Online.exe # Base folder From a815bb67f90fa2e8866f5904741f8056c2f2e596 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 22:56:03 +0000 Subject: [PATCH 18/57] Move yet another line out of before_script --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f8974a0..7f2a517 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,6 @@ cache: before_script: - echo Current working directory is $(pwd) - - sudo apt-get install --no-install-recommends -y upx zip unzip build linux x86_64: image: rabits/qt:5.9-desktop @@ -16,6 +15,7 @@ build linux x86_64: script: - qmake --version - gcc --version + - sudo apt-get install --no-install-recommends -y upx zip unzip - cd scripts - ./configure_ubuntu.sh From 1008a2e8ac38f89c4c320b25c21afbb5912d24c7 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:00:52 +0000 Subject: [PATCH 19/57] Use TARGET_SPEC in Windows build --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f2a517..74ab320 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ build windows i686: - cd .. # Build - - qmake + - /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake - make -j4 # Post-processing From c47521baa3d04af86b886506d5d4f23fe23fa86d Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:03:20 +0000 Subject: [PATCH 20/57] Missing `cd bass` --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74ab320..1780a60 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,6 +37,7 @@ build windows i686: script: # Extract BASS - mkdir bass + - cd bass - curl http://www.un4seen.com/files/bass24.zip -o bass.zip - unzip bass.zip - cp bass.dll ../../lib From 470e0f1902c664f8c192e8251cd123aaa0cf4b2e Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:09:28 +0000 Subject: [PATCH 21/57] One less `..` on copying bass.dll .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1780a60..9307863 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ build windows i686: - cd bass - curl http://www.un4seen.com/files/bass24.zip -o bass.zip - unzip bass.zip - - cp bass.dll ../../lib + - cp bass.dll ../lib - cd .. # Build From 21465def688370eb8a4132352ae789e7a1fca9cb Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:16:28 +0000 Subject: [PATCH 22/57] Add bin/ folder as artifact on Windows target --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9307863..7b8e68a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,6 +49,9 @@ build windows i686: # Post-processing - upx --lzma -9 --force bin/Attorney_Online.exe + artifacts: + paths: + - bin/ # Base folder .deploy_base: &deploy_base | From 3cbbcd9a5c7a4574fb1edd1e7075345592c3dd75 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:23:55 +0000 Subject: [PATCH 23/57] Add zip dependency to Windows deploy --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b8e68a..5f10805 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ build linux x86_64: script: - qmake --version - gcc --version - - sudo apt-get install --no-install-recommends -y upx zip unzip + - sudo apt-get install --no-install-recommends -y upx unzip - cd scripts - ./configure_ubuntu.sh @@ -107,6 +107,8 @@ deploy windows: - docker - linux script: + - sudo apt-get install --no-install-recommends -y zip + - mkdir artifact - cd artifact - *deploy_base From a453951aead4a4fdc2c5fca9965bb369d5587302 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:28:54 +0000 Subject: [PATCH 24/57] Use apt-get instead of sudo apt-get on Windows deploy --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5f10805..8c9b249 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -107,7 +107,7 @@ deploy windows: - docker - linux script: - - sudo apt-get install --no-install-recommends -y zip + - apt-get install --no-install-recommends -y zip - mkdir artifact - cd artifact From 0dca4f14fefb9349c68b3afccec9e997be61a768 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:36:03 +0000 Subject: [PATCH 25/57] Use ubuntu instead of ruby or whatever GitLab CI defaults to --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c9b249..4f038f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,6 +100,7 @@ deploy linux: - zip/ deploy windows: + image: ubuntu stage: deploy dependencies: - build windows i686 @@ -107,6 +108,7 @@ deploy windows: - docker - linux script: + - apt-get update - apt-get install --no-install-recommends -y zip - mkdir artifact From bc0e22464056f3e6e9ef11b7d841f673fe7dff31 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Wed, 6 Feb 2019 23:42:08 +0000 Subject: [PATCH 26/57] Fix final zip command in Windows deploy --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4f038f4..43809de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,7 +109,7 @@ deploy windows: - linux script: - apt-get update - - apt-get install --no-install-recommends -y zip + - apt-get install --no-install-recommends -y zip git - mkdir artifact - cd artifact @@ -122,7 +122,9 @@ deploy windows: # Zipping # -r: recursive; -9: max compression; -l: convert to CR LF - - zip -r -9 -l Attorney_Online_$(git describe --tags)_windows_i386.zip . + - mkdir ../zip + - zip -r -9 -l ../zip/Attorney_Online_$(git describe --tags)_windows_i386.zip . + - sha1sum ../zip/* artifacts: paths: - zip/ \ No newline at end of file From 68f88350bf7c703b34f24bf3f78735753af877d4 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Thu, 7 Feb 2019 00:52:18 +0000 Subject: [PATCH 27/57] Granularize shared library deployment --- .gitlab-ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 43809de..3711c18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,10 +66,6 @@ build windows i686: cp -a ../README.md README.md.txt cp -a ../LICENSE.MIT LICENSE.txt -# Shared libraries -.deploy_libs: &deploy_libs | - cp -a ../lib/* . - deploy linux: stage: deploy dependencies: @@ -82,9 +78,9 @@ deploy linux: - cd artifact - *deploy_base - *deploy_misc - - *deploy_libs # Platform-specific + - cp -a ../lib/*.so . - cp -a ../bin/Attorney_Online . - echo "#!/bin/sh" >> ./run.sh - echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh @@ -115,9 +111,9 @@ deploy windows: - cd artifact - *deploy_base - *deploy_misc - - *deploy_libs # Platform-specific + - cp -a ../lib/*.dll . - cp -a ../bin/Attorney_Online.exe . # Zipping From b8191f7745b70f3841f2dba90d6576f5d81cfe34 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Thu, 7 Feb 2019 20:03:22 +0000 Subject: [PATCH 28/57] Compile Linux build with Qt 5.4 instead of 5.9 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3711c18..1e2836d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ before_script: - echo Current working directory is $(pwd) build linux x86_64: - image: rabits/qt:5.9-desktop + image: rabits/qt:5.4-desktop stage: build tags: - docker From a2bcf70d1ea56f25edd295c49a98bdd414f941fe Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Thu, 7 Feb 2019 20:14:31 +0000 Subject: [PATCH 29/57] Revert "Compile Linux build with Qt 5.4 instead of 5.9" This reverts commit b8191f7745b70f3841f2dba90d6576f5d81cfe34 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1e2836d..3711c18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ before_script: - echo Current working directory is $(pwd) build linux x86_64: - image: rabits/qt:5.4-desktop + image: rabits/qt:5.9-desktop stage: build tags: - docker From 0057ff03da5a2370705252b89561a46a97cfddb1 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 02:47:39 +0000 Subject: [PATCH 30/57] Use latest Ubuntu for Linux builds --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3711c18..8efe154 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,15 +7,15 @@ before_script: - echo Current working directory is $(pwd) build linux x86_64: - image: rabits/qt:5.9-desktop + image: ubuntu stage: build tags: - docker - linux script: + - apt-get install --no-install-recommends -y qt5-default clang make git upx unzip - qmake --version - - gcc --version - - sudo apt-get install --no-install-recommends -y upx unzip + - clang --version - cd scripts - ./configure_ubuntu.sh From c755e3d97d714613486aab3a7bd837b015067955 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 02:49:57 +0000 Subject: [PATCH 31/57] apt-get update --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8efe154..3aa3ee2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,7 @@ build linux x86_64: - docker - linux script: + - apt-get update - apt-get install --no-install-recommends -y qt5-default clang make git upx unzip - qmake --version - clang --version From 59f72ffa65a1634e9f4b27d6be88826c59bf1754 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 02:56:10 +0000 Subject: [PATCH 32/57] Use clang-linux mkspec --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3aa3ee2..35a142a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ build linux x86_64: - linux script: - apt-get update - - apt-get install --no-install-recommends -y qt5-default clang make git upx unzip + - apt-get install --no-install-recommends -y qt5-default clang make git sudo curl upx unzip - qmake --version - clang --version @@ -22,7 +22,7 @@ build linux x86_64: - ./configure_ubuntu.sh - cd .. - - qmake + - qmake -spec clang-linux - make -j4 - upx --lzma -9 --force bin/Attorney_Online artifacts: From c8a3fd6560ced28c96f13c2b4c062a1ac93f4880 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 03:10:39 +0000 Subject: [PATCH 33/57] clang-linux -> linux-clang --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35a142a..41456e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ build linux x86_64: - linux script: - apt-get update - - apt-get install --no-install-recommends -y qt5-default clang make git sudo curl upx unzip + - apt-get install --no-install-recommends -y qt5-default clang make git sudo curl ca-certificates pkg-config upx unzip - qmake --version - clang --version @@ -22,7 +22,7 @@ build linux x86_64: - ./configure_ubuntu.sh - cd .. - - qmake -spec clang-linux + - qmake -spec linux-clang - make -j4 - upx --lzma -9 --force bin/Attorney_Online artifacts: From 830dba62a16c748761c4cb498e58a336f4d288ff Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 03:13:08 +0000 Subject: [PATCH 34/57] Add qtmultimedia5-dev --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41456e5..bf3a9bf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ build linux x86_64: - linux script: - apt-get update - - apt-get install --no-install-recommends -y qt5-default clang make git sudo curl ca-certificates pkg-config upx unzip + - apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev clang make git sudo curl ca-certificates pkg-config upx unzip - qmake --version - clang --version From 3b718808b76f1970eb029f2c48bd4f33ae233052 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 04:42:26 +0000 Subject: [PATCH 35/57] Move Ubuntu configure script to .gitlab-ci.yml Sorry, Omni. I'll probably move everything back to shell scripts in the future. --- .gitlab-ci.yml | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf3a9bf..a94d28c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,17 +13,45 @@ build linux x86_64: - docker - linux script: + # Install dependencies - apt-get update - - apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev clang make git sudo curl ca-certificates pkg-config upx unzip + - > + apt-get install --no-install-recommends -y qt5-default qtmultimedia5-dev + clang make git sudo curl ca-certificates pkg-config upx unzip + + # Print versions - qmake --version - clang --version - - cd scripts - - ./configure_ubuntu.sh + # Extract BASS + - mkdir bass + - cd bass + - curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip + - unzip bass.zip + - cp x64/libbass.so ../lib - cd .. + # Extract Discord RPC + - mkdir discord-rpc + - cd discord-rpc + - curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc_linux.zip + - unzip discord_rpc_linux.zip + - cp discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ../lib + - cd .. + + # Extract QtApng + - mkdir qtapng + - cd qtapng + - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_clang_64_5.12.0.tar.xz -o apng.tar.xz + - tar -xvf apng.tar.xz + - cp clang_64/plugins/imageformats/libqapng.so ../lib + - cd .. + + # Build - qmake -spec linux-clang - make -j4 + + # Post-processing - upx --lzma -9 --force bin/Attorney_Online artifacts: paths: @@ -61,7 +89,7 @@ build windows i686: cp -a ../base/themes/default base/themes/ cp -a ../base/config.ini base/config.sample.ini cp -a ../base/serverlist.txt base/serverlist.sample.txt - + # Miscellaneous files .deploy_misc: &deploy_misc | cp -a ../README.md README.md.txt @@ -84,7 +112,7 @@ deploy linux: - cp -a ../lib/*.so . - cp -a ../bin/Attorney_Online . - echo "#!/bin/sh" >> ./run.sh - - echo "LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh + - echo "LD_LIBRARY_PATH=.:\$LD_LIBRARY_PATH ./Attorney_Online" >> ./run.sh - chmod +x ./run.sh # Zipping From 757da1624c660496e6cb858285be85c4fb4974b1 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sat, 9 Feb 2019 04:51:44 +0000 Subject: [PATCH 36/57] Oh, so apparently the clang QtApng builds are for Mac... --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a94d28c..b010ba5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,9 +42,9 @@ build linux x86_64: # Extract QtApng - mkdir qtapng - cd qtapng - - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_clang_64_5.12.0.tar.xz -o apng.tar.xz + - curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz - tar -xvf apng.tar.xz - - cp clang_64/plugins/imageformats/libqapng.so ../lib + - cp gcc_64/plugins/imageformats/libqapng.so ../lib - cd .. # Build From 6261be1dc82e3f113a0392c2cf93449d784cfb08 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 01:04:28 +0000 Subject: [PATCH 37/57] Add Travis script for Mac builds --- .travis.yml | 11 +++++++++++ scripts/macos_build.sh | 30 ++++++++++++++++++++++++++++++ scripts/macos_post_build.sh | 2 -- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .travis.yml create mode 100644 scripts/macos_build.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..855b57d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: cpp +os: osx + +before_install: + - brew update + - brew install qt5 + +script: + # XXX: please chmod +x the shell script. + - sh ./scripts/macos_build.sh + - ./scripts/macos_post_build.sh diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh new file mode 100644 index 0000000..150c338 --- /dev/null +++ b/scripts/macos_build.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +set -Eeuxo pipefail + +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig +export PATH=$PATH:/usr/local/opt/qt5/bin:/usr/local/bin + +mkdir bass +cd bass +curl http://www.un4seen.com/files/bass24-osx.zip -o bass.zip +unzip bass.zip +cp libbass.dylib ../lib +cd .. + +mkdir discord-rpc +cd discord-rpc +curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-osx.zip +unzip discord_rpc_osx.zip +cp discord-rpc/osx-dynamic/lib/libdiscord-rpc.a ../lib +cd .. + +mkdir qtapng +cd qtapng +curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_clang_64_5.12.0.tar.xz -o apng.tar.xz +tar -xvf apng.tar.xz +cp clang_64/plugins/imageformats/libqapng.dylib ../lib +cd .. + +qmake && make -j2 diff --git a/scripts/macos_post_build.sh b/scripts/macos_post_build.sh index d69da0b..700361e 100644 --- a/scripts/macos_post_build.sh +++ b/scripts/macos_post_build.sh @@ -2,8 +2,6 @@ DST_FOLDER="./bin/Attorney_Online.app/Contents/Frameworks" -cd .. - mkdir $DST_FOLDER cp ./lib/libbass.dylib $DST_FOLDER From f23d163a277f8546953c2f5c3e334d2e09ec21f6 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 01:52:16 +0000 Subject: [PATCH 38/57] Okay, let's try this again... --- .travis.yml | 4 ++-- scripts/macos_build.sh | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 855b57d..e1fcb36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,5 +7,5 @@ before_install: script: # XXX: please chmod +x the shell script. - - sh ./scripts/macos_build.sh - - ./scripts/macos_post_build.sh + - bash ./scripts/macos_build.sh + - bash ./scripts/macos_post_build.sh diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh index 150c338..86605c5 100644 --- a/scripts/macos_build.sh +++ b/scripts/macos_build.sh @@ -1,9 +1,8 @@ #!/bin/sh -set -Eeuxo pipefail +set -Eexo pipefail -export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig -export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig +export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig export PATH=$PATH:/usr/local/opt/qt5/bin:/usr/local/bin mkdir bass From 200008fd81d305ea1641e4b643119071dc3a08a7 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 02:00:13 +0000 Subject: [PATCH 39/57] Actually save the discord-rpc zip --- scripts/macos_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh index 86605c5..efe0f7c 100644 --- a/scripts/macos_build.sh +++ b/scripts/macos_build.sh @@ -14,7 +14,7 @@ cd .. mkdir discord-rpc cd discord-rpc -curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-osx.zip +curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-osx.zip -o discord_rpc_osx.zip unzip discord_rpc_osx.zip cp discord-rpc/osx-dynamic/lib/libdiscord-rpc.a ../lib cd .. From f05c3defcfc1cd64147c2f3c7de0ca3c44140050 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 02:08:48 +0000 Subject: [PATCH 40/57] Keep fixing issues with the Mac build script --- .travis.yml | 7 ++++--- scripts/macos_build.sh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1fcb36..dfde416 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ language: cpp os: osx -before_install: - - brew update - - brew install qt5 +addons: + homebrew: + packages: + - qt5 script: # XXX: please chmod +x the shell script. diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh index efe0f7c..ebe93d3 100644 --- a/scripts/macos_build.sh +++ b/scripts/macos_build.sh @@ -16,7 +16,7 @@ mkdir discord-rpc cd discord-rpc curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-osx.zip -o discord_rpc_osx.zip unzip discord_rpc_osx.zip -cp discord-rpc/osx-dynamic/lib/libdiscord-rpc.a ../lib +cp discord-rpc/osx-static/lib/libdiscord-rpc.a ../lib cd .. mkdir qtapng From e4c4ecb0fde4c26a8e8dd3719fe2a3401fa6b3fc Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 02:19:12 +0000 Subject: [PATCH 41/57] Use CoreFoundation library --- Attorney_Online.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/Attorney_Online.pro b/Attorney_Online.pro index c0bc4ab..f4e4cd6 100644 --- a/Attorney_Online.pro +++ b/Attorney_Online.pro @@ -13,6 +13,7 @@ MOC_DIR = $$PWD/build SOURCES += $$files($$PWD/src/*.cpp) HEADERS += $$files($$PWD/include/*.h) LIBS += -L$$PWD/lib -lbass -ldiscord-rpc +macx:LIBS += -framework CoreFoundation CONFIG += c++14 From 09ff1755a0238cedf2411a315d1de76a372e3960 Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 02:32:11 +0000 Subject: [PATCH 42/57] Add more frameworks --- Attorney_Online.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Attorney_Online.pro b/Attorney_Online.pro index f4e4cd6..e1961a0 100644 --- a/Attorney_Online.pro +++ b/Attorney_Online.pro @@ -13,7 +13,7 @@ MOC_DIR = $$PWD/build SOURCES += $$files($$PWD/src/*.cpp) HEADERS += $$files($$PWD/include/*.h) LIBS += -L$$PWD/lib -lbass -ldiscord-rpc -macx:LIBS += -framework CoreFoundation +macx:LIBS += -framework CoreFoundation -framework Foundation -framework CoreServices CONFIG += c++14 From 9a32aa6e849cab35710aaddd5e2323276e8eccfb Mon Sep 17 00:00:00 2001 From: oldmud0 <3421260-oldmud0@users.noreply.gitlab.com> Date: Sun, 10 Feb 2019 02:45:10 +0000 Subject: [PATCH 43/57] Add BASSOPUS to all target platforms --- .gitlab-ci.yml | 6 ++++++ scripts/macos_build.sh | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b010ba5..928352f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,6 +29,9 @@ build linux x86_64: - curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip - unzip bass.zip - cp x64/libbass.so ../lib + - curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip + - unzip bassopus.zip + - cp x64/libbassopus.so ../lib - cd .. # Extract Discord RPC @@ -70,6 +73,9 @@ build windows i686: - curl http://www.un4seen.com/files/bass24.zip -o bass.zip - unzip bass.zip - cp bass.dll ../lib + - curl http://www.un4seen.com/files/bassopus24.zip -o bassopus.zip + - unzip bassopus.zip + - cp bassopus.dll ../lib - cd .. # Build diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh index ebe93d3..22e2d45 100644 --- a/scripts/macos_build.sh +++ b/scripts/macos_build.sh @@ -10,6 +10,10 @@ cd bass curl http://www.un4seen.com/files/bass24-osx.zip -o bass.zip unzip bass.zip cp libbass.dylib ../lib + +curl http://www.un4seen.com/files/bassopus24-osx.zip -o bassopus.zip +unzip bassopus.zip +cp libbassopus.dylib ../lib cd .. mkdir discord-rpc From 5d0044b93cfd5ada490c7c1b296bdd0f1602a8f2 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Fri, 29 Mar 2019 21:03:43 -0500 Subject: [PATCH 44/57] Add a bunch of scripts --- .gitlab-ci.yml | 45 +++++++++++++--- .travis.yml | 5 +- scripts/macos_build.sh | 0 scripts/macos_post_build.sh | 0 scripts/package.json | 9 ++++ scripts/update_manifest.js | 84 ++++++++++++++++++++++++++++++ scripts/update_program_manifest.js | 39 ++++++++++++++ scripts/wasabi_asset.sh | 45 ++++++++++++++++ scripts/wasabi_program.sh | 35 +++++++++++++ scripts/windows/Dockerfile | 17 ++++++ scripts/windows/Dockerfile-mxe | 44 ++++++++++++++++ scripts/windows/how-to-push.md | 19 +++++++ 12 files changed, 332 insertions(+), 10 deletions(-) mode change 100644 => 100755 scripts/macos_build.sh mode change 100644 => 100755 scripts/macos_post_build.sh create mode 100644 scripts/package.json create mode 100755 scripts/update_manifest.js create mode 100755 scripts/update_program_manifest.js create mode 100755 scripts/wasabi_asset.sh create mode 100755 scripts/wasabi_program.sh create mode 100644 scripts/windows/Dockerfile create mode 100644 scripts/windows/Dockerfile-mxe create mode 100644 scripts/windows/how-to-push.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 928352f..d05a337 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,12 @@ +stages: + - build + - deploy + - publish + cache: key: ${CI_COMMIT_REF_SLUG} paths: - - lib/ + - lib/ before_script: - echo Current working directory is $(pwd) @@ -53,7 +58,7 @@ build linux x86_64: # Build - qmake -spec linux-clang - make -j4 - + # Post-processing - upx --lzma -9 --force bin/Attorney_Online artifacts: @@ -101,7 +106,7 @@ build windows i686: cp -a ../README.md README.md.txt cp -a ../LICENSE.MIT LICENSE.txt -deploy linux: +deploy linux x86_64: stage: deploy dependencies: - build linux x86_64 @@ -124,13 +129,13 @@ deploy linux: # Zipping # zip -r -9 -l Attorney_Online_$(git describe --tags)_linux_x86_64.zip . - mkdir ../zip - - tar cavf ../zip/Attorney_Online_$(git describe --tags)_x64.tar.xz * + - tar cavf ../zip/Attorney_Online_$(git describe --tags)_linux_x64.tar.xz * - sha1sum ../zip/* artifacts: paths: - zip/ -deploy windows: +deploy windows i686: image: ubuntu stage: deploy dependencies: @@ -154,8 +159,34 @@ deploy windows: # Zipping # -r: recursive; -9: max compression; -l: convert to CR LF - mkdir ../zip - - zip -r -9 -l ../zip/Attorney_Online_$(git describe --tags)_windows_i386.zip . + - zip -r -9 -l ../zip/Attorney_Online_$(git describe --tags)_windows_x86.zip . - sha1sum ../zip/* artifacts: paths: - - zip/ \ No newline at end of file + - zip/ + +publish linux x86_64: + image: ubuntu + stage: publish + dependencies: + - deploy linux x86_64 + when: manual + script: + - cd zip + - ../scripts/wasabi.sh + variables: + MANIFEST: program_linux_x86_64.json + ARTIFACT_SUFFIX: _linux_x64.tar.xz + +publish windows i686: + image: ubuntu + stage: publish + dependencies: + - deploy windows i686 + when: manual + script: + - cd zip + - ../scripts/wasabi.sh + variables: + MANIFEST: program_winnt_i386.json + ARTIFACT_SUFFIX: _windows_x86.zip diff --git a/.travis.yml b/.travis.yml index dfde416..4243b3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,5 @@ addons: - qt5 script: - # XXX: please chmod +x the shell script. - - bash ./scripts/macos_build.sh - - bash ./scripts/macos_post_build.sh + - ./scripts/macos_build.sh + - ./scripts/macos_post_build.sh diff --git a/scripts/macos_build.sh b/scripts/macos_build.sh old mode 100644 new mode 100755 diff --git a/scripts/macos_post_build.sh b/scripts/macos_post_build.sh old mode 100644 new mode 100755 diff --git a/scripts/package.json b/scripts/package.json new file mode 100644 index 0000000..126a392 --- /dev/null +++ b/scripts/package.json @@ -0,0 +1,9 @@ +{ + "name": "ao-ci-scripts", + "version": "1.0.0", + "main": "update_manifest.js", + "dependencies": { + "argparse": "^1.0.10" + }, + "license": "ISC" +} diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js new file mode 100755 index 0000000..5f64cfb --- /dev/null +++ b/scripts/update_manifest.js @@ -0,0 +1,84 @@ +#!/usr/bin/env node + +const fs = require("fs"); +const crypto = require("crypto"); +const ArgumentParser = require("argparse").ArgumentParser; + +function isFile(file) { + if (!fs.existsSync(file)) { + console.error(`File '${file}' not found. Try again.`); + throw Error(); + } + return file; +} + +const argParser = new ArgumentParser({ + addHelp: true, + description: "Adds a new latest version to the manifest file based on the " + + "provided zip file, including an incremental update." +}); +argParser.addArgument("manifestFile", { + metavar: "", type: isFile +}); +argParser.addArgument("version", { + metavar: "" +}); +argParser.addArgument([ "-f", "--full" ], { + metavar: "", type: isFile, nargs: 1, + dest: "fullZipFile" +}); +argParser.addArgument([ "-i", "--incremental" ], { + type: isFile, nargs: 2, dest: "incremental", + metavar: ["", ""] +}); +argParser.addArgument([ "-e", "--executable" ], { + metavar: "[executable file]", nargs: 1, + dest: "executable" +}); + +const { + manifestFile, + version, + fullZipFile, + incremental: [incrementalZipFile, deletionsFile], + executable +} = argParser.parseArgs(); + +const manifest = JSON.parse(fs.readFileSync(manifestFile)); + +const deleteActions = deletionsFile ? fs.readFileSync(deletionsFile) + .split("\n").map(file => { + // XXX: This does not delete empty directories. Finding them would + // actually be a substantial amount of work because Git does not + // give us a good way of finding directories that were deleted. + return { action: "delete", target: file }; + }) : []; + +const urlBase = "https://s3.wasabisys.com/ao-downloads/"; + +manifest.versions = [{ + version, + executable, + prev: manifest.version[0] ? manifest.version[0].version : undefined, + full: fullZipFile ? [ + { + action: "dl", + url: urlBase + encodeURIComponent(fullZipFile), + hash: crypto.createHash("sha1") + .update(fs.readFileSync(fullZipFile)) + .digest("hex") + } + ] : undefined, + update: incremental ? [ + ...deleteActions, + { + action: "dl", + url: urlBase + encodeURIComponent(incrementalZipFile), + hash: crypto.createHash("sha1") + .update(fs.readFileSync(incrementalZipFile)) + .digest("hex") + } + ] : undefined +}, ...manifest.versions]; + +fs.writeFileSync(manifestFile, JSON.stringify(manifest, null, 4)); diff --git a/scripts/update_program_manifest.js b/scripts/update_program_manifest.js new file mode 100755 index 0000000..9efc814 --- /dev/null +++ b/scripts/update_program_manifest.js @@ -0,0 +1,39 @@ +#!/usr/bin/env node + +const fs = require("fs"); +const crypto = require("crypto"); + +const [ _nodeExe, _jsPath, manifestFile, version, zipFile ] = process.argv; + +if (!manifestFile || !version || !zipFile) { + console.log(`Usage: update_program_manifest `); + console.log(`Adds a new latest version to the manifest file based on the ` + + `provided zip file.`); + process.exit(1); +} + +if (!fs.existsSync(manifestFile)) { + console.error(`Manifest file '${manifestFile}' not found. Try again.`); + process.exit(2); +} + +if (!fs.existsSync(zipFile)) { + console.error(`Zip file '${zipFile}' not found. Try again.`); + process.exit(2); +} + +const manifest = JSON.parse(fs.readFileSync(manifestFile)); + +manifest.versions = [{ + version, + executable: "Attorney_Online.exe", + full: [ + { + action: "dl", + url: "https://s3.wasabisys.com/ao-downloads/" + encodeURIComponent(zipFile), + hash: crypto.createHash("sha1").update(fs.readFileSync(zipFile)).digest("hex") + } + ] +}, ...manifest.versions]; + +fs.writeFileSync(manifestFile, JSON.stringify(manifest, null, 4)); \ No newline at end of file diff --git a/scripts/wasabi_asset.sh b/scripts/wasabi_asset.sh new file mode 100755 index 0000000..d424183 --- /dev/null +++ b/scripts/wasabi_asset.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Updates the specified program manifest to a new archive and version +# and uploads the new archive and manifest to S3/Wasabi. +# +# Requires: +# MANIFEST: name of the manifest file +# ARTIFACT_SUFFIX: suffix of the archive to be uploaded (including extension) +# S3_ACCESS_KEY and S3_SECRET_KEY + + +# -E: inherit ERR trap by shell functions +# -e: stop script on ERR trap +# -u: stop script on unbound variables +# -x: print command before running it +# -o pipefail: fail if any command in a pipeline fails +set -Eeuxo pipefail + +aws configure set aws_access_key_id ${S3_ACCESS_KEY} +aws configure set aws_secret_access_key ${S3_SECRET_KEY} +aws configure set default.region us-east-1 + +export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com" +export S3_MANIFESTS="s3://ao-manifests" +export S3_ARCHIVES="s3://ao-downloads" + +export VERSION=$(git describe --tags) +export ARCHIVE_FULL="vanilla_full_${VERSION}_${ARTIFACT_SUFFIX}" +export ARCHIVE_INCR="vanilla_update_${VERSION}_${ARTIFACT_SUFFIX}" + +git log --diff-filter=D --summary $(git rev-list --tags --skip=1 --max-count=1)..HEAD | \ + grep "delete mode" | cut -d' ' -f 5- > deletions.txt + +${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} . +if [[ -n FULL_ZIP && FULL_ZIP != '0' ]]; then + node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} + -f ${ARCHIVE_FULL} -i ${ARCHIVE_INCR} deletions.txt + ${S3_COPY} ${ARCHIVE_FULL} ${S3_ARCHIVES} +else + node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} + -i ${ARCHIVE_INCR} deletions.txt +fi +${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES} +${S3_COPY} ${MANIFEST} ${S3_MANIFESTS} + +rm -f ${MANIFEST} diff --git a/scripts/wasabi_program.sh b/scripts/wasabi_program.sh new file mode 100755 index 0000000..41e2e35 --- /dev/null +++ b/scripts/wasabi_program.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# Updates the specified program manifest to a new archive and version +# and uploads the new archive and manifest to S3/Wasabi. +# +# Requires: +# MANIFEST: name of the manifest file +# ARTIFACT_SUFFIX: suffix of the archive to be uploaded (including extension) +# S3_ACCESS_KEY and S3_SECRET_KEY + + +# -E: inherit ERR trap by shell functions +# -e: stop script on ERR trap +# -u: stop script on unbound variables +# -x: print command before running it +# -o pipefail: fail if any command in a pipeline fails +set -Eeuxo pipefail + +aws configure set aws_access_key_id ${S3_ACCESS_KEY} +aws configure set aws_secret_access_key ${S3_SECRET_KEY} +aws configure set default.region us-east-1 + +export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com" +export S3_MANIFESTS="s3://ao-manifests" +export S3_ARCHIVES="s3://ao-downloads" + +export VERSION=$(git describe --tags) +export ARCHIVE="Attorney_Online_${VERSION}_${ARTIFACT_SUFFIX}" + +${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} . +node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} \ + -f ${ARCHIVE} -e Attorney_Online.exe +${S3_COPY} ${ARCHIVE} ${S3_ARCHIVES} +${S3_COPY} ${MANIFEST} ${S3_MANIFESTS} + +rm -f ${MANIFEST} diff --git a/scripts/windows/Dockerfile b/scripts/windows/Dockerfile new file mode 100644 index 0000000..90d6c27 --- /dev/null +++ b/scripts/windows/Dockerfile @@ -0,0 +1,17 @@ +FROM oldmud0/mxe-qt:5.12.1-win32-static-posix +#FROM fffaraz/qt:windows + +ENV TARGET_SPEC i686-w64-mingw32.static.posix + +# Build Discord RPC statically +RUN git clone https://github.com/discordapp/discord-rpc +WORKDIR discord-rpc/build +RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mxe/usr/${TARGET_SPEC} +RUN /opt/mxe/usr/bin/${TARGET_SPEC}-cmake --build . --config Release --target install +WORKDIR ../.. + +# Build QtApng statically +RUN git clone https://github.com/Skycoder42/QtApng +WORKDIR QtApng +RUN /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake && make qmake_all && make && make install +WORKDIR .. diff --git a/scripts/windows/Dockerfile-mxe b/scripts/windows/Dockerfile-mxe new file mode 100644 index 0000000..e6caec5 --- /dev/null +++ b/scripts/windows/Dockerfile-mxe @@ -0,0 +1,44 @@ +FROM ubuntu:18.04 + +RUN apt-get update +RUN apt-get install -y \ + autoconf \ + automake \ + autopoint \ + bash \ + bison \ + bzip2 \ + flex \ + g++ \ + g++-multilib \ + gettext \ + git \ + gperf \ + intltool \ + libc6-dev-i386 \ + libgdk-pixbuf2.0-dev \ + libltdl-dev \ + libssl-dev \ + libtool-bin \ + libxml-parser-perl \ + lzip \ + make \ + openssl \ + p7zip-full \ + patch \ + perl \ + pkg-config \ + python \ + ruby \ + sed \ + unzip \ + wget \ + xz-utils + +RUN git clone https://github.com/mxe/mxe.git +RUN mv mxe /opt/mxe +WORKDIR /opt/mxe +RUN make -j4 MXE_TARGETS="i686-w64-mingw32.static.posix" qtbase qtmultimedia +ENV PATH=/opt/mxe/usr/bin:$PATH + +WORKDIR / diff --git a/scripts/windows/how-to-push.md b/scripts/windows/how-to-push.md new file mode 100644 index 0000000..8c1c18d --- /dev/null +++ b/scripts/windows/how-to-push.md @@ -0,0 +1,19 @@ +When you want to build a new version of Qt: +```docker +docker build -t mxe-windows-static . -f Dockerfile-mxe +docker tag mxe-windows-static oldmud0/mxe-qt:5.12.1-win32-static-posix +docker push oldmud0/mxe-qt:5.12.1-win32-static-posix +``` + +Remember to log into Docker Hub before attempting to push. + +When you want to build a new version of any dependency required for building AO: +```docker +docker build -t mxe-windows-static-ao . -f Dockerfile +docker tag mxe-windows-static-ao registry.gitlab.com/attorneyonline/ao2-client/builder-windows-i686 +docker push registry.gitlab.com/attorneyonline/ao2-client/builder-windows-i686 +``` + +Remember to create an access token in GitLab before attempting to push. + +GitLab CI depends on `builder-windows-i686` image to be present in the repository's registry in order for the Windows build to succeed. From edb3c6b538e80c08595baf71d32356bf0cf97795 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 15:28:30 -0500 Subject: [PATCH 45/57] Continue work on manifest scripts --- scripts/.gitignore | 6 ++++ scripts/update_manifest.js | 5 +-- scripts/wasabi.sh | 72 ++++++++++++++++++++++++++++++++++++++ scripts/wasabi_asset.sh | 45 ------------------------ 4 files changed, 81 insertions(+), 47 deletions(-) create mode 100644 scripts/.gitignore create mode 100755 scripts/wasabi.sh delete mode 100755 scripts/wasabi_asset.sh diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000..2f8a2b9 --- /dev/null +++ b/scripts/.gitignore @@ -0,0 +1,6 @@ +node_modules/ + +# Cursed file +package-lock.json + +s3_keys.sh diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index 5f64cfb..66df75f 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -2,6 +2,7 @@ const fs = require("fs"); const crypto = require("crypto"); +const path = require("path"); const ArgumentParser = require("argparse").ArgumentParser; function isFile(file) { @@ -63,7 +64,7 @@ manifest.versions = [{ full: fullZipFile ? [ { action: "dl", - url: urlBase + encodeURIComponent(fullZipFile), + url: urlBase + encodeURIComponent(path.basename(fullZipFile)), hash: crypto.createHash("sha1") .update(fs.readFileSync(fullZipFile)) .digest("hex") @@ -73,7 +74,7 @@ manifest.versions = [{ ...deleteActions, { action: "dl", - url: urlBase + encodeURIComponent(incrementalZipFile), + url: urlBase + encodeURIComponent(path.basename(incrementalZipFile)), hash: crypto.createHash("sha1") .update(fs.readFileSync(incrementalZipFile)) .digest("hex") diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh new file mode 100755 index 0000000..5200652 --- /dev/null +++ b/scripts/wasabi.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# Updates the specified program manifest to a new archive and version +# and uploads the new archive and manifest to S3/Wasabi. +# +# Requires: +# MANIFEST: name of the manifest file +# S3_ACCESS_KEY, S3_SECRET_KEY: S3 credentials +# ARCHIVE_FULL: name of the full archive (if desired) +# ARCHIVE_INCR: name of the incremental archive (if desired) +# VERSION: name of the new version + + +# -E: inherit ERR trap by shell functions +# -e: stop script on ERR trap +# -u: stop script on unbound variables +# -x: print command before running it +# -o pipefail: fail if any command in a pipeline fails +set -Eeuxo pipefail + +aws configure set aws_access_key_id ${S3_ACCESS_KEY} +aws configure set aws_secret_access_key ${S3_SECRET_KEY} +aws configure set default.region us-east-1 + +export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com" +export S3_MANIFESTS="s3://ao-manifests" +export S3_ARCHIVES="s3://ao-downloads" + +#export VERSION=$(git describe --tags) +#export ARCHIVE_FULL="vanilla_full_${VERSION}_${ARTIFACT_SUFFIX}" +export ARCHIVE_FULL_ARG="" +#export ARCHIVE_INCR="vanilla_update_${VERSION}_${ARTIFACT_SUFFIX}" +export ARCHIVE_INCR_ARG="" + +export LAST_TAGGED_VERSION=$(git rev-list --tags --skip=1 --max-count=1) +echo "Previous tagged version: ${LAST_TAGGED_VERSION}" +echo "Current tagged version: ${VERSION}" + +if [[ -n $ARCHIVE_INCR && -n $LAST_TAGGED_VERSION ]]; then + echo "Incremental archive: ${ARCHIVE_INCR}" + + # Get deleted files + export DELETIONS_FILE="deletions.txt" + git log --diff-filter=D --summary ${LAST_TAGGED_VERSION}..HEAD | \ + grep "delete mode" | cut -d' ' -f 5- > ${DELETIONS_FILE} + + # Get added/modified files + git log --name-only --oneline --diff-filter=d ec5c..HEAD | \ + grep -v -E "^[0-9a-f]{7} " | sort -u | zip ${ARCHIVE_INCR} -@ + + export ARCHIVE_INCR_ARG="-i ${ARCHIVE_INCR} ${DELETIONS_FILE}" +elif [[ -n $ARCHIVE_INCR && -z $LAST_TAGGED_VERSION ]]; then + echo "Incremental archive was requested, but there is no previous version" +fi + +if [[ -n $ARCHIVE_FULL ]]; then + echo "Full archive: ${ARCHIVE_INCR}" + export ARCHIVE_FULL_ARG="-f ${ARCHIVE_FULL}" +fi + +${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} . +node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} \ + ${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG} + +if [[ -n $ARCHIVE_INCR_ARG ]]; then + ${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES} +fi + +if [[ -n $ARCHIVE_FULL_ARG ]]; then + ${S3_COPY} ${ARCHIVE_FULL} ${S3_ARCHIVES} +fi + +${S3_COPY} ${MANIFEST} ${S3_MANIFESTS} diff --git a/scripts/wasabi_asset.sh b/scripts/wasabi_asset.sh deleted file mode 100755 index d424183..0000000 --- a/scripts/wasabi_asset.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Updates the specified program manifest to a new archive and version -# and uploads the new archive and manifest to S3/Wasabi. -# -# Requires: -# MANIFEST: name of the manifest file -# ARTIFACT_SUFFIX: suffix of the archive to be uploaded (including extension) -# S3_ACCESS_KEY and S3_SECRET_KEY - - -# -E: inherit ERR trap by shell functions -# -e: stop script on ERR trap -# -u: stop script on unbound variables -# -x: print command before running it -# -o pipefail: fail if any command in a pipeline fails -set -Eeuxo pipefail - -aws configure set aws_access_key_id ${S3_ACCESS_KEY} -aws configure set aws_secret_access_key ${S3_SECRET_KEY} -aws configure set default.region us-east-1 - -export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com" -export S3_MANIFESTS="s3://ao-manifests" -export S3_ARCHIVES="s3://ao-downloads" - -export VERSION=$(git describe --tags) -export ARCHIVE_FULL="vanilla_full_${VERSION}_${ARTIFACT_SUFFIX}" -export ARCHIVE_INCR="vanilla_update_${VERSION}_${ARTIFACT_SUFFIX}" - -git log --diff-filter=D --summary $(git rev-list --tags --skip=1 --max-count=1)..HEAD | \ - grep "delete mode" | cut -d' ' -f 5- > deletions.txt - -${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} . -if [[ -n FULL_ZIP && FULL_ZIP != '0' ]]; then - node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} - -f ${ARCHIVE_FULL} -i ${ARCHIVE_INCR} deletions.txt - ${S3_COPY} ${ARCHIVE_FULL} ${S3_ARCHIVES} -else - node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} - -i ${ARCHIVE_INCR} deletions.txt -fi -${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES} -${S3_COPY} ${MANIFEST} ${S3_MANIFESTS} - -rm -f ${MANIFEST} From 4561f1809feb16dff449daa972466e3ed2dfe494 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 16:12:31 -0500 Subject: [PATCH 46/57] Fix some bugs in manifest script --- scripts/update_manifest.js | 5 +++-- scripts/wasabi.sh | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index 66df75f..ea1f85e 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -41,9 +41,10 @@ const { manifestFile, version, fullZipFile, - incremental: [incrementalZipFile, deletionsFile], + incremental, executable } = argParser.parseArgs(); +const [incrementalZipFile, deletionsFile] = incremental || []; const manifest = JSON.parse(fs.readFileSync(manifestFile)); @@ -60,7 +61,7 @@ const urlBase = "https://s3.wasabisys.com/ao-downloads/"; manifest.versions = [{ version, executable, - prev: manifest.version[0] ? manifest.version[0].version : undefined, + prev: manifest.versions[0] ? manifest.versions[0].version : undefined, full: fullZipFile ? [ { action: "dl", diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index 5200652..2e8932d 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -8,6 +8,7 @@ # ARCHIVE_FULL: name of the full archive (if desired) # ARCHIVE_INCR: name of the incremental archive (if desired) # VERSION: name of the new version +# EXECUTABLE: name of the executable (if program manifest) # -E: inherit ERR trap by shell functions @@ -25,11 +26,9 @@ export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com" export S3_MANIFESTS="s3://ao-manifests" export S3_ARCHIVES="s3://ao-downloads" -#export VERSION=$(git describe --tags) -#export ARCHIVE_FULL="vanilla_full_${VERSION}_${ARTIFACT_SUFFIX}" export ARCHIVE_FULL_ARG="" -#export ARCHIVE_INCR="vanilla_update_${VERSION}_${ARTIFACT_SUFFIX}" export ARCHIVE_INCR_ARG="" +export EXECUTABLE_ARG="" export LAST_TAGGED_VERSION=$(git rev-list --tags --skip=1 --max-count=1) echo "Previous tagged version: ${LAST_TAGGED_VERSION}" @@ -57,9 +56,13 @@ if [[ -n $ARCHIVE_FULL ]]; then export ARCHIVE_FULL_ARG="-f ${ARCHIVE_FULL}" fi +if [[ -n $EXECUTABLE ]]; then + export EXECUTABLE_ARG="-e ${EXECUTABLE}" +fi + ${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} . node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} \ - ${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG} + ${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG} ${EXECUTABLE} if [[ -n $ARCHIVE_INCR_ARG ]]; then ${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES} From 458eea04d31f749c0494cf78d040bf8e80ddf9da Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 16:18:05 -0500 Subject: [PATCH 47/57] Fix unbound variable EXECUTABLE --- scripts/wasabi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index 2e8932d..0613ffd 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -56,13 +56,13 @@ if [[ -n $ARCHIVE_FULL ]]; then export ARCHIVE_FULL_ARG="-f ${ARCHIVE_FULL}" fi -if [[ -n $EXECUTABLE ]]; then +if [[ -v $EXECUTABLE ]]; then export EXECUTABLE_ARG="-e ${EXECUTABLE}" fi ${S3_COPY} ${S3_MANIFESTS}/${MANIFEST} . node $(dirname $0)/update_manifest.js ${MANIFEST} ${VERSION} \ - ${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG} ${EXECUTABLE} + ${ARCHIVE_FULL_ARG} ${ARCHIVE_INCR_ARG} ${EXECUTABLE_ARG} if [[ -n $ARCHIVE_INCR_ARG ]]; then ${S3_COPY} ${ARCHIVE_INCR} ${S3_ARCHIVES} From d75cee4996af64336c7823968c8cdb475b5c5aff Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 16:21:51 -0500 Subject: [PATCH 48/57] Fix unbound variable (again) --- scripts/wasabi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index 0613ffd..a322b6c 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -56,7 +56,7 @@ if [[ -n $ARCHIVE_FULL ]]; then export ARCHIVE_FULL_ARG="-f ${ARCHIVE_FULL}" fi -if [[ -v $EXECUTABLE ]]; then +if [[ -v EXECUTABLE ]]; then export EXECUTABLE_ARG="-e ${EXECUTABLE}" fi From 153c458f9e6d95a3e1ee205be28dbdbb32ee88eb Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 16:32:10 -0500 Subject: [PATCH 49/57] Fix type errors during argument parsing --- scripts/update_manifest.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index ea1f85e..bcb3ac7 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -40,11 +40,14 @@ argParser.addArgument([ "-e", "--executable" ], { const { manifestFile, version, - fullZipFile, - incremental, - executable + fullZipFileArgs, + incrementalArgs, + executableArgs } = argParser.parseArgs(); -const [incrementalZipFile, deletionsFile] = incremental || []; + +const [incrementalZipFile, deletionsFile] = incrementalArgs || []; +const [fullZipFile] = fullZipFileArgs || []; +const [executable] = executableArgs || []; const manifest = JSON.parse(fs.readFileSync(manifestFile)); @@ -71,7 +74,7 @@ manifest.versions = [{ .digest("hex") } ] : undefined, - update: incremental ? [ + update: incrementalArgs ? [ ...deleteActions, { action: "dl", From bc92942d29eb43b6f8a37ca8ae4ca303a5f28b96 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 16:47:16 -0500 Subject: [PATCH 50/57] Allow overwriting versions of same name --- scripts/update_manifest.js | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index bcb3ac7..71fa3f8 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -26,15 +26,15 @@ argParser.addArgument("version", { }); argParser.addArgument([ "-f", "--full" ], { metavar: "", type: isFile, nargs: 1, - dest: "fullZipFile" + dest: "fullZipFileArgs" }); argParser.addArgument([ "-i", "--incremental" ], { - type: isFile, nargs: 2, dest: "incremental", + type: isFile, nargs: 2, dest: "incrementalArgs", metavar: ["", ""] }); argParser.addArgument([ "-e", "--executable" ], { metavar: "[executable file]", nargs: 1, - dest: "executable" + dest: "executableArgs" }); const { @@ -49,6 +49,12 @@ const [incrementalZipFile, deletionsFile] = incrementalArgs || []; const [fullZipFile] = fullZipFileArgs || []; const [executable] = executableArgs || []; +// Do one final check +if (!incrementalZipFile && !fullZipFile) { + console.error("No download archive specified! Abort."); + process.exit(1); +} + const manifest = JSON.parse(fs.readFileSync(manifestFile)); const deleteActions = deletionsFile ? fs.readFileSync(deletionsFile) @@ -61,7 +67,7 @@ const deleteActions = deletionsFile ? fs.readFileSync(deletionsFile) const urlBase = "https://s3.wasabisys.com/ao-downloads/"; -manifest.versions = [{ +const versionEntry = { version, executable, prev: manifest.versions[0] ? manifest.versions[0].version : undefined, @@ -84,6 +90,18 @@ manifest.versions = [{ .digest("hex") } ] : undefined -}, ...manifest.versions]; +}; + +const existingVersion = manifest.versions.filter(v => v.version == version); +if (existingVersion) { + console.warn(`Warning: version ${version} already exists. Adding new values.`); + + // Don't overwrite prev - it will cause headaches + delete versionEntry.prev; + + Object.assign(existingVersion, versionEntry); +} else { + manifest.versions = [versionEntry, ...manifest.versions]; +} fs.writeFileSync(manifestFile, JSON.stringify(manifest, null, 4)); From a5435183e4a181c75624442866014c132238c7d8 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 17:04:39 -0500 Subject: [PATCH 51/57] Stronger check for array length --- scripts/update_manifest.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index 71fa3f8..adbdc34 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -92,14 +92,17 @@ const versionEntry = { ] : undefined }; -const existingVersion = manifest.versions.filter(v => v.version == version); -if (existingVersion) { +console.log("Generated version entry:", versionEntry); + +const existingVersions = manifest.versions.filter(v => v.version == version); +if (existingVersions.length > 0) { console.warn(`Warning: version ${version} already exists. Adding new values.`); // Don't overwrite prev - it will cause headaches delete versionEntry.prev; - Object.assign(existingVersion, versionEntry); + Object.assign(existingVersions[0], versionEntry); + console.log("Merged version entry:", existingVersions[0]); } else { manifest.versions = [versionEntry, ...manifest.versions]; } From 190b0d7c1e5e5461958ff7ec0576da7671a161c9 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 17:10:24 -0500 Subject: [PATCH 52/57] Fix issues parsing deletions file --- scripts/update_manifest.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index adbdc34..220439c 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -58,6 +58,8 @@ if (!incrementalZipFile && !fullZipFile) { const manifest = JSON.parse(fs.readFileSync(manifestFile)); const deleteActions = deletionsFile ? fs.readFileSync(deletionsFile) + .toString() + .trim() .split("\n").map(file => { // XXX: This does not delete empty directories. Finding them would // actually be a substantial amount of work because Git does not From ed41f3c4e5964600063bbab2bf27265ede9e4c19 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 17:14:44 -0500 Subject: [PATCH 53/57] Remove S3_MANIFESTS and S3_ARCHIVES --- scripts/wasabi.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index a322b6c..12b310e 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -5,6 +5,7 @@ # Requires: # MANIFEST: name of the manifest file # S3_ACCESS_KEY, S3_SECRET_KEY: S3 credentials +# S3_MANIFESTS, S3_ARCHIVES: S3 paths to manifests and downloads # ARCHIVE_FULL: name of the full archive (if desired) # ARCHIVE_INCR: name of the incremental archive (if desired) # VERSION: name of the new version @@ -23,8 +24,6 @@ aws configure set aws_secret_access_key ${S3_SECRET_KEY} aws configure set default.region us-east-1 export S3_COPY="aws s3 cp --endpoint-url=https://s3.wasabisys.com" -export S3_MANIFESTS="s3://ao-manifests" -export S3_ARCHIVES="s3://ao-downloads" export ARCHIVE_FULL_ARG="" export ARCHIVE_INCR_ARG="" From f4b31356df011decba4e157a6d8d2c24f17ade2e Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 17:22:05 -0500 Subject: [PATCH 54/57] Fix typo in getting added/modified files --- scripts/wasabi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index 12b310e..2067e5e 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -42,7 +42,7 @@ if [[ -n $ARCHIVE_INCR && -n $LAST_TAGGED_VERSION ]]; then grep "delete mode" | cut -d' ' -f 5- > ${DELETIONS_FILE} # Get added/modified files - git log --name-only --oneline --diff-filter=d ec5c..HEAD | \ + git log --name-only --oneline --diff-filter=d ${LAST_TAGGED_VERSION}..HEAD | \ grep -v -E "^[0-9a-f]{7} " | sort -u | zip ${ARCHIVE_INCR} -@ export ARCHIVE_INCR_ARG="-i ${ARCHIVE_INCR} ${DELETIONS_FILE}" From 9b4c18e8dc151ca0387e8d4514b8d9886d03caa7 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 22:58:05 -0500 Subject: [PATCH 55/57] Cover rename and deleted directory cases --- scripts/update_manifest.js | 59 +++++++++++++++++++++++++++++++------- scripts/wasabi.sh | 13 ++++----- 2 files changed, 55 insertions(+), 17 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index 220439c..19e1b15 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -30,7 +30,7 @@ argParser.addArgument([ "-f", "--full" ], { }); argParser.addArgument([ "-i", "--incremental" ], { type: isFile, nargs: 2, dest: "incrementalArgs", - metavar: ["", ""] + metavar: ["", ""] }); argParser.addArgument([ "-e", "--executable" ], { metavar: "[executable file]", nargs: 1, @@ -45,7 +45,7 @@ const { executableArgs } = argParser.parseArgs(); -const [incrementalZipFile, deletionsFile] = incrementalArgs || []; +const [incrementalZipFile, changesFile] = incrementalArgs || []; const [fullZipFile] = fullZipFileArgs || []; const [executable] = executableArgs || []; @@ -55,17 +55,56 @@ if (!incrementalZipFile && !fullZipFile) { process.exit(1); } +// Do a quick litmus test to prevent deleting everything incorrectly +if (changesFile && !fs.existsSync("base")) { + console.error("The working directory must be set to an " + + "asset folder in order for deleted directories " + + "to be calculated correctly. Abort."); + process.exit(1); +} + const manifest = JSON.parse(fs.readFileSync(manifestFile)); -const deleteActions = deletionsFile ? fs.readFileSync(deletionsFile) +const dirsDeleted = new Set(); +const specialActions = changesFile ? + fs.readFileSync(changesFile) .toString() .trim() - .split("\n").map(file => { - // XXX: This does not delete empty directories. Finding them would - // actually be a substantial amount of work because Git does not - // give us a good way of finding directories that were deleted. - return { action: "delete", target: file }; - }) : []; + .split("\n") + .map(line => line.split("\t")) + .map(([mode, target, source]) => { + switch (mode[0]) { + case "D": // Deleted + // Check if the folder exists relative to the working + // directory, and if not, add it to the dirsDeleted list. + // Keep going up the tree to see how many directories were + // deleted. + let dir = path.dirname(target); + while (!dirsDeleted.has(dir) && !fs.existsSync(dir)) { + dirsDeleted.add(dir); + dir = path.dirname(dir); + } + + return { action: "delete", target }; + case "R": // Renamed + // NOTE: Make sure that the launcher's implementation of + // the move action also creates directories when needed. + return { action: "move", source, target}; + default: + return null; + } + }) + // Remove ignored file mode changes + .filter(action => action !== null) + // Create actions based on directories to be deleted. + // Always have deeper directories first, to guarantee that deleting + // higher-level directories will succeed. + + Array.from(dirsDeleted.values()) + .sort((a, b) => b.split("/").length - a.split("/").length) + .map(dir => { + return { action: "deleteDir", target: dir }; + }) + : []; const urlBase = "https://s3.wasabisys.com/ao-downloads/"; @@ -83,7 +122,7 @@ const versionEntry = { } ] : undefined, update: incrementalArgs ? [ - ...deleteActions, + ...specialActions, { action: "dl", url: urlBase + encodeURIComponent(path.basename(incrementalZipFile)), diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index 2067e5e..a20c0e0 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -36,16 +36,15 @@ echo "Current tagged version: ${VERSION}" if [[ -n $ARCHIVE_INCR && -n $LAST_TAGGED_VERSION ]]; then echo "Incremental archive: ${ARCHIVE_INCR}" - # Get deleted files - export DELETIONS_FILE="deletions.txt" - git log --diff-filter=D --summary ${LAST_TAGGED_VERSION}..HEAD | \ - grep "delete mode" | cut -d' ' -f 5- > ${DELETIONS_FILE} + # Get all files + export CHANGES_FILE="changes.txt" + git diff --summary ${LAST_TAGGED_VERSION}..HEAD > ${CHANGES_FILE} # Get added/modified files - git log --name-only --oneline --diff-filter=d ${LAST_TAGGED_VERSION}..HEAD | \ - grep -v -E "^[0-9a-f]{7} " | sort -u | zip ${ARCHIVE_INCR} -@ + git diff --name-only --diff-filter=dr ${LAST_TAGGED_VERSION}..HEAD | \ + zip ${ARCHIVE_INCR} -@ - export ARCHIVE_INCR_ARG="-i ${ARCHIVE_INCR} ${DELETIONS_FILE}" + export ARCHIVE_INCR_ARG="-i ${ARCHIVE_INCR} ${CHANGES_FILE}" elif [[ -n $ARCHIVE_INCR && -z $LAST_TAGGED_VERSION ]]; then echo "Incremental archive was requested, but there is no previous version" fi From eae8ed1552085fccbd87049fe438b2f6284b3b95 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 23:18:28 -0500 Subject: [PATCH 56/57] I hate JavaScript sometimes --- scripts/update_manifest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update_manifest.js b/scripts/update_manifest.js index 19e1b15..1a06a2d 100755 --- a/scripts/update_manifest.js +++ b/scripts/update_manifest.js @@ -99,11 +99,11 @@ const specialActions = changesFile ? // Create actions based on directories to be deleted. // Always have deeper directories first, to guarantee that deleting // higher-level directories will succeed. - + Array.from(dirsDeleted.values()) + .concat(Array.from(dirsDeleted.values()) .sort((a, b) => b.split("/").length - a.split("/").length) .map(dir => { return { action: "deleteDir", target: dir }; - }) + })) : []; const urlBase = "https://s3.wasabisys.com/ao-downloads/"; From 93b482cbc794c343d9f61a8c37bf900dfd925d1c Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Wed, 3 Apr 2019 23:24:37 -0500 Subject: [PATCH 57/57] Use --name-status instead of --summary --- scripts/wasabi.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/wasabi.sh b/scripts/wasabi.sh index a20c0e0..95fb3ee 100755 --- a/scripts/wasabi.sh +++ b/scripts/wasabi.sh @@ -38,7 +38,7 @@ if [[ -n $ARCHIVE_INCR && -n $LAST_TAGGED_VERSION ]]; then # Get all files export CHANGES_FILE="changes.txt" - git diff --summary ${LAST_TAGGED_VERSION}..HEAD > ${CHANGES_FILE} + git diff --name-status ${LAST_TAGGED_VERSION}..HEAD > ${CHANGES_FILE} # Get added/modified files git diff --name-only --diff-filter=dr ${LAST_TAGGED_VERSION}..HEAD | \