File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def gh_upload_http
6767 def set_v3_common_headers ( req , connection : nil )
6868 req [ 'User-Agent' ] = GH_NAME
6969 req [ 'Authorization' ] = "token #{ TOKEN } "
70- req [ 'Accept' ] = 'application/vnd.github.v3+json'
70+ req [ 'Accept' ] = 'application/vnd.github+json' # old 'application/vnd.github .v3+json'
7171 req [ 'Connection' ] = 'close' if connection == 'close'
7272 end
7373
Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ class << self
1818 TEMP = ENV . fetch ( 'RUNNER_TEMP' ) { ENV . fetch ( 'RUNNER_WORKSPACE' ) { ENV [ 'TEMP' ] } }
1919 ORIG_MSYS2 = "#{ TEMP } /msys64" . gsub '\\' , '/'
2020
21- SYNC = 'var/lib/pacman/sync'
21+ SYNC = 'var/lib/pacman/sync'
2222 LOCAL = 'var/lib/pacman/local'
23+ CACHE = 'var/cache/pacman/pkg'
2324
2425 def update_msys2
2526 updated_keys = pacman_syuu
@@ -70,6 +71,18 @@ def clean_database(pre)
7071 end
7172 end
7273
74+ # remove downloaded packages and their '.sig' files
75+ def clean_packages
76+ dir = "#{ MSYS2_ROOT } /#{ CACHE } "
77+ files = Dir . glob ( '*.*' , base : dir )
78+ Dir . chdir ( dir ) do
79+ files . each do |fn |
80+ next unless File . file? fn
81+ File . delete fn
82+ end
83+ end
84+ end
85+
7386 def run
7487 current_pkgs = %x[#{ PACMAN } -Q] . split ( "\n " ) . reject { |l | l . start_with? 'mingw-w64-' }
7588
@@ -93,6 +106,7 @@ def run
93106 remove_non_msys2
94107 remove_duplicate_files
95108 clean_database 'msys'
109+ clean_packages
96110
97111 # create 7z file
98112 STDOUT . syswrite "##[group]#{ YEL } Create msys2 7z file#{ RST } \n "
You can’t perform that action at this time.
0 commit comments